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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 9 Aug 2011 13:13:49 -0400
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Jeff Moyer <jmoyer@...hat.com>
Cc:	Shaohua Li <shli@...nel.org>, linux-kernel@...r.kernel.org,
	Tejun Heo <tj@...nel.org>, Jens Axboe <jaxboe@...ionio.com>,
	msnitzer@...hat.com
Subject: Re: [patch] blk-flush: fix flush policy calculation

On Tue, Aug 02, 2011 at 03:46:49PM -0400, Jeff Moyer wrote:
> Vivek Goyal <vgoyal@...hat.com> writes:
> 
> >> In testing, I did this:
> >> 
> >> @@ -1817,6 +1817,14 @@ int blk_insert_cloned_request(struct
> >> request_queue *q, struct request *rq)
> >>                 return -EIO;
> >>  #endif
> >>  
> >> +       if ((rq->cmd_flags & (REQ_FLUSH|REQ_FUA)) && !q->flush_flags) {
> >> +               rq->cmd_flags &= ~(REQ_FLUSH|REQ_FUA);
> >> +               if (!blk_rq_bytes(rq)) {
> >> +                       blk_end_request(rq, 0, 0);
> >> +                       return 0;
> >> +               }
> >> +       }
> >> +
> >
> > Will it make more sense to take care resetting flush/fua flags in
> > blk_insert_flush()
> 
> Yes, that's much cleaner.
> 
> > and also the part which will end the request if request is empty.
> 
> Mmm-hmm.
> 
> I tried this, and it blew up in my face.  ;-)  Cloned requests from
> device-mapper-land have rq->end_io filled in, which causes
> blk_insert_flush to BUG here:
> 
>         BUG_ON(rq->end_io);

So how does it work when underlying device supports FLUSH/FUA? That means
that dm-multipath requets never go through flush machinery? So if a
queue does not support FUA but supports FLUSH, then FUA will not be
honored by the underlying driver and request can very well be in cache?

IOW, looks like even if component devices of a multipath device support
FLUSH, requests don't go through it and hence atleast FUA is broken? And
that would also mean that these don't benefit from flush merge logic.

I guess we need to sort out this req->end_io issue and if both caller
and flush machinery needs to make use of this pointer, then flush 
machinery should save it and restore on completion path.

Thanks
Vivek
--
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