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

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

 



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@xxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>
> Cc: Nick Piggin <npiggin@xxxxxxxxx>
> Cc: Michael S. Tsirkin <mst@xxxxxxxxxx>
> Cc: Jeremy Fitzhardinge <jeremy@xxxxxxxxxxxxx>
> Cc: Chris Wright <chrisw@xxxxxxxxxxxx>
> Cc: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
> Cc: Boaz Harrosh <bharrosh@xxxxxxxxxxx>

Acked-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx>

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@xxxxxxxxxxx>
> Cc: David S. Miller <davem@xxxxxxxxxxxxx>
> Cc: Alasdair G Kergon <agk@xxxxxxxxxx>
> Cc: Pierre Ossman <drzeus@xxxxxxxxx>
> Cc: Stefan Weinhuber <wein@xxxxxxxxxx>
> ---
<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@xxxxxxxxxx>
> Cc: Boaz Harrosh <bharrosh@xxxxxxxxxxx>

Acked-by: Boaz Harrosh <bharrosh@xxxxxxxxxxx>

> Cc: James Bottomley <James.Bottomley@xxxxxxx>
> Cc: Peter Osterlund <petero2@xxxxxxxxx>
> ---
>  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;
>  		}

--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux