Re: [PATCH v4 2/3] fs: Convert kiocb rw_hint from enum to u16

2018-05-18 Thread Adam Manzanares
On 5/18/18 9:05 AM, Christoph Hellwig wrote: >> +/* ki_hint changed from enum to u16, make sure rw_hint fits into u16 */ > > I don't think this comment is very useful. > >> +static inline u16 ki_hint_valid(enum rw_hint hint) > > I'd call this ki_hint_validate. > >> +{ >> +if (hint >

Re: [PATCH v4 2/3] fs: Convert kiocb rw_hint from enum to u16

2018-05-18 Thread Adam Manzanares
On 5/18/18 9:05 AM, Christoph Hellwig wrote: >> +/* ki_hint changed from enum to u16, make sure rw_hint fits into u16 */ > > I don't think this comment is very useful. > >> +static inline u16 ki_hint_valid(enum rw_hint hint) > > I'd call this ki_hint_validate. > >> +{ >> +if (hint >

Re: [PATCH v4 2/3] fs: Convert kiocb rw_hint from enum to u16

2018-05-18 Thread Christoph Hellwig
> +/* ki_hint changed from enum to u16, make sure rw_hint fits into u16 */ I don't think this comment is very useful. > +static inline u16 ki_hint_valid(enum rw_hint hint) I'd call this ki_hint_validate. > +{ > + if (hint > MAX_KI_HINT) > + return 0; > + > + return hint;

Re: [PATCH v4 2/3] fs: Convert kiocb rw_hint from enum to u16

2018-05-18 Thread Christoph Hellwig
> +/* ki_hint changed from enum to u16, make sure rw_hint fits into u16 */ I don't think this comment is very useful. > +static inline u16 ki_hint_valid(enum rw_hint hint) I'd call this ki_hint_validate. > +{ > + if (hint > MAX_KI_HINT) > + return 0; > + > + return hint;

[PATCH v4 2/3] fs: Convert kiocb rw_hint from enum to u16

2018-05-17 Thread adam . manzanares
From: Adam Manzanares In order to avoid kiocb bloat for per command iopriority support, rw_hint is converted from enum to a u16. Added a guard around ki_hint assigment. Signed-off-by: Adam Manzanares --- include/linux/fs.h | 15 +--

[PATCH v4 2/3] fs: Convert kiocb rw_hint from enum to u16

2018-05-17 Thread adam . manzanares
From: Adam Manzanares In order to avoid kiocb bloat for per command iopriority support, rw_hint is converted from enum to a u16. Added a guard around ki_hint assigment. Signed-off-by: Adam Manzanares --- include/linux/fs.h | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-)