Re: [PATCH 1/5] block: Implement support for WRITE SAME

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

 



On Mon, Feb 13, 2012 at 05:19:43PM -0500, Martin K. Petersen wrote:

[..]
> 
> block: Mark discard requests unmergeable
> 
> Discards were globally marked as mergeable and as a result we had
> several code paths that explicitly disabled merging when REQ_DISCARD was
> set.
> 
> Mark discard requests as unmergable and remove special-casing of
> REQ_DISCARD.

Mike Snitzer mentioned that we do allow merging of one discard request
with another except following two cases.

- Don't allow merging of secure discard.
- Don't allow merging of discard request with another non-discard request.

I guess that's why DISCARD requests are mergeable globally and later
we deny merge in selected cases. Do we want to disable that behavior?

[..]
> @@ -591,8 +591,7 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where)
>  
>  	if (rq->cmd_flags & REQ_SOFTBARRIER) {
>  		/* barriers are scheduling boundary, update end_sector */
> -		if (rq->cmd_type == REQ_TYPE_FS ||
> -		    (rq->cmd_flags & REQ_DISCARD)) {
> +		if (rq->cmd_type == REQ_TYPE_FS) {

This is orthogonal to merging?


[..]
> @@ -634,8 +633,7 @@ void __elv_add_request(struct request_queue *q, struct request *rq, int where)
>  		if (elv_attempt_insert_merge(q, rq))
>  			break;
>  	case ELEVATOR_INSERT_SORT:
> -		BUG_ON(rq->cmd_type != REQ_TYPE_FS &&
> -		       !(rq->cmd_flags & REQ_DISCARD));
> +		BUG_ON(rq->cmd_type != REQ_TYPE_FS);

This change also looks orthogonal to merging. Will it not trigger BUG_ON()
when DISCARD request is being inserted into the elevator?

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


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux