[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <94D0CD8314A33A4D9D801C0FE68B402958C2ECA6@G9W0745.americas.hpqcorp.net>
Date: Sat, 30 Aug 2014 22:14:41 +0000
From: "Elliott, Robert (Server Storage)" <Elliott@...com>
To: Ming Lei <ming.lei@...onical.com>, Jens Axboe <axboe@...nel.dk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dave Kleikamp <dave.kleikamp@...cle.com>
CC: Zach Brown <zab@...bo.net>, Christoph Hellwig <hch@...radead.org>,
"Maxim Patlasov" <mpatlasov@...allels.com>
Subject: RE: [PATCH v2 4/6] block: loop: say goodby to bio
> -----Original Message-----
> From: linux-kernel-owner@...r.kernel.org [mailto:linux-kernel-
> owner@...r.kernel.org] On Behalf Of Ming Lei
> Sent: Saturday, 30 August, 2014 11:08 AM
> To: Jens Axboe; linux-kernel@...r.kernel.org; Dave Kleikamp
> Cc: Zach Brown; Christoph Hellwig; Maxim Patlasov; Ming Lei
> Subject: [PATCH v2 4/6] block: loop: say goodby to bio
...
> -static int do_bio_filebacked(struct loop_device *lo, struct bio
> *bio)
> +static int do_req_filebacked(struct loop_device *lo, struct request
> *rq)
> {
> loff_t pos;
> int ret;
>
> - pos = ((loff_t) bio->bi_iter.bi_sector << 9) + lo->lo_offset;
> + pos = ((loff_t) blk_rq_pos(rq) << 9) + lo->lo_offset;
>
> - if (bio_rw(bio) == WRITE) {
> + if (rq->cmd_flags & REQ_WRITE) {
> struct file *file = lo->lo_backing_file;
>
> - if (bio->bi_rw & REQ_FLUSH) {
> + if (rq->cmd_flags & REQ_FLUSH) {
> ret = vfs_fsync(file, 0);
> if (unlikely(ret && ret != -EINVAL)) {
> ret = -EIO;
> @@ -436,7 +439,7 @@ static int do_bio_filebacked(struct loop_device
> *lo, struct bio *bio)
> * encryption is enabled, because it may give an attacker
> * useful information.
> */
> - if (bio->bi_rw & REQ_DISCARD) {
> + if (rq->cmd_flags & REQ_DISCARD) {
> struct file *file = lo->lo_backing_file;
> int mode = FALLOC_FL_PUNCH_HOLE |
> FALLOC_FL_KEEP_SIZE;
Can a REQ_WRITE_SAME make it through to here?
---
Rob Elliott HP Server Storage
--
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