lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4E417C87.5040105@fusionio.com>
Date:	Tue, 9 Aug 2011 20:29:27 +0200
From:	Jens Axboe <jaxboe@...ionio.com>
To:	Jeff Moyer <jmoyer@...hat.com>
CC:	Tejun Heo <tj@...nel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [block] allow blk_flush_policy to return REQ_FSEQ_DATA independent
  of *FLUSH

On 2011-08-09 17:24, Jeff Moyer wrote:
> Hi,
> 
> blk_insert_flush has the following check:
> 
> 	/*
> 	 * If there's data but flush is not necessary, the request can be
> 	 * processed directly without going through flush machinery.  Queue
> 	 * for normal execution.
> 	 */
> 	if ((policy & REQ_FSEQ_DATA) &&
> 	    !(policy & (REQ_FSEQ_PREFLUSH | REQ_FSEQ_POSTFLUSH))) {
> 		list_add_tail(&rq->queuelist, &q->queue_head);
> 		return;
> 	}
> 
> However, blk_flush_policy will not return with policy set to only
> REQ_FSEQ_DATA:
> 
> static unsigned int blk_flush_policy(unsigned int fflags, struct request *rq)
> {
> 	unsigned int policy = 0;
> 
> 	if (fflags & REQ_FLUSH) {
> 		if (rq->cmd_flags & REQ_FLUSH)
> 			policy |= REQ_FSEQ_PREFLUSH;
> 		if (blk_rq_sectors(rq))
> 			policy |= REQ_FSEQ_DATA;
> 		if (!(fflags & REQ_FUA) && (rq->cmd_flags & REQ_FUA))
> 			policy |= REQ_FSEQ_POSTFLUSH;
> 	}
> 	return policy;
> }
> 
> Notice that REQ_FSEQ_DATA is only set if REQ_FLUSH is set.  Fix this
> mismatch by moving the setting of REQ_FSEQ_DATA outside of the REQ_FLUSH
> check.

Thanks Jeff, applied.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ