[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACVXFVOg+qYAh8fOSY9iHhWJOa9Jyg4FqfjwVxc20tgNUsxWfA@mail.gmail.com>
Date: Mon, 1 Sep 2014 12:18:02 +0800
From: Ming Lei <ming.lei@...onical.com>
To: "Elliott, Robert (Server Storage)" <Elliott@...com>
Cc: Jens Axboe <axboe@...nel.dk>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Dave Kleikamp <dave.kleikamp@...cle.com>,
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
On Sun, Aug 31, 2014 at 6:14 AM, Elliott, Robert (Server Storage)
<Elliott@...com> wrote:
>
>
>> -----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?
It can't because loop doesn't support WRITE_SAME.
Thanks,
--
Ming Lei
--
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