[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH 04/30] block: deprecate barrier and replace blk_queue_ordered() with blk_queue_flush()



On 08/25/2010 06:47 PM, Tejun Heo wrote:
> Barrier is deemed too heavy and will soon be replaced by FLUSH/FUA
> requests.  Deprecate barrier.  All REQ_HARDBARRIERs are failed with
> -EOPNOTSUPP and blk_queue_ordered() is replaced with simpler
> blk_queue_flush().
> 
> blk_queue_flush() takes combinations of REQ_FLUSH and FUA.  If a
> device has write cache and can flush it, it should set REQ_FLUSH.  If
> the device can handle FUA writes, it should also set REQ_FUA.
> 
> All blk_queue_ordered() users are converted.
> 
> * ORDERED_DRAIN is mapped to 0 which is the default value.
> * ORDERED_DRAIN_FLUSH is mapped to REQ_FLUSH.
> * ORDERED_DRAIN_FLUSH_FUA is mapped to REQ_FLUSH | REQ_FUA.
> 
> Signed-off-by: Tejun Heo <tj kernel org>
> Cc: Christoph Hellwig <hch infradead org>
> Cc: Nick Piggin <npiggin kernel dk>
> Cc: Michael S. Tsirkin <mst redhat com>
> Cc: Jeremy Fitzhardinge <jeremy xensource com>
> Cc: Chris Wright <chrisw sous-sol org>
> Cc: FUJITA Tomonori <fujita tomonori lab ntt co jp>
> Cc: Boaz Harrosh <bharrosh panasas com>

Acked-by: Boaz Harrosh <bharrosh panasas com>

Actually osd as support for FUA as well. It's on my todo
to implement it.

Thanks Tejun, as usual, after your visit there is more room
in the house.

> Cc: Geert Uytterhoeven <Geert Uytterhoeven sonycom com>
> Cc: David S. Miller <davem davemloft net>
> Cc: Alasdair G Kergon <agk redhat com>
> Cc: Pierre Ossman <drzeus drzeus cx>
> Cc: Stefan Weinhuber <wein de ibm com>
> ---
<snip>
>  drivers/block/osdblk.c       |    2 +-
> diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c
> index 2284b4f..72d6246 100644
> --- a/drivers/block/osdblk.c
> +++ b/drivers/block/osdblk.c
> @@ -439,7 +439,7 @@ static int osdblk_init_disk(struct osdblk_device *osdev)
>  	blk_queue_stack_limits(q, osd_request_queue(osdev->osd));
>  
>  	blk_queue_prep_rq(q, blk_queue_start_tag);
> -	blk_queue_ordered(q, QUEUE_ORDERED_DRAIN_FLUSH);
> +	blk_queue_flush(q, REQ_FLUSH);
>  
>  	disk->queue = q;
>  
<snip>

Also this mail
On 08/25/2010 06:47 PM, Tejun Heo wrote:
> REQ_HARDBARRIER is deprecated.  Remove spurious uses in the following
> users.  Please note that other than osdblk, all other uses were
> already spurious before deprecation.
> 
> * osdblk: osdblk_rq_fn() won't receive any request with
>   REQ_HARDBARRIER set.  Remove the test for it.
> 
> * pktcdvd: use of REQ_HARDBARRIER in pkt_generic_packet() doesn't mean
>   anything.  Removed.
> 
> * aic7xxx_old: Setting MSG_ORDERED_Q_TAG on REQ_HARDBARRIER is
>   spurious.  Removed.
> 
> * sas_scsi_host: Setting TASK_ATTR_ORDERED on REQ_HARDBARRIER is
>   spurious.  Removed.
> 
> * scsi_tcq: The ordered tag path wasn't being used anyway.  Removed.
> 
> Signed-off-by: Tejun Heo <tj kernel org>
> Cc: Boaz Harrosh <bharrosh panasas com>

Acked-by: Boaz Harrosh <bharrosh panasas com>

> Cc: James Bottomley <James Bottomley suse de>
> Cc: Peter Osterlund <petero2 telia com>
> ---
>  drivers/block/osdblk.c              |    3 +--
<snip>
> diff --git a/drivers/block/osdblk.c b/drivers/block/osdblk.c
> index 72d6246..87311eb 100644
> --- a/drivers/block/osdblk.c
> +++ b/drivers/block/osdblk.c
> @@ -310,8 +310,7 @@ static void osdblk_rq_fn(struct request_queue *q)
>  			break;
>  
>  		/* filter out block requests we don't understand */
> -		if (rq->cmd_type != REQ_TYPE_FS &&
> -		    !(rq->cmd_flags & REQ_HARDBARRIER)) {
> +		if (rq->cmd_type != REQ_TYPE_FS) {
>  			blk_end_request_all(rq, 0);
>  			continue;
>  		}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]