Re: [PATCH 06/12] block: add helpers for setting/checking write hint validity

2017-06-16 Thread Jens Axboe
On 06/16/2017 10:47 AM, Martin K. Petersen wrote: > > Jens, > >> +static const unsigned int rwf_write_to_opf_flag[] = { >> +0, REQ_WRITE_SHORT, REQ_WRITE_MEDIUM, REQ_WRITE_LONG, REQ_WRITE_EXTREME >> +}; > > Minor nit: When I see WRITE_SHORT I instinctively think data corruption. > > Can we

Re: [PATCH 06/12] block: add helpers for setting/checking write hint validity

2017-06-16 Thread Martin K. Petersen
Jens, > +static const unsigned int rwf_write_to_opf_flag[] = { > + 0, REQ_WRITE_SHORT, REQ_WRITE_MEDIUM, REQ_WRITE_LONG, REQ_WRITE_EXTREME > +}; Minor nit: When I see WRITE_SHORT I instinctively think data corruption. Can we make these REQ_LIFETIME_SHORT or something instead? It loses the

[PATCH 06/12] block: add helpers for setting/checking write hint validity

2017-06-15 Thread Jens Axboe
We map the WRITE_HINT_* life time hints to the internal flags. Drivers can then, in turn, map those flags to a suitable stream type. Signed-off-by: Jens Axboe --- block/bio.c | 16 include/linux/bio.h | 1 + include/linux/blk_types.h | 5