[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101025123353.GA16981@thunk.org>
Date: Mon, 25 Oct 2010 08:33:53 -0400
From: Ted Ts'o <tytso@....edu>
To: Dmitry <dmonakhov@...nvz.org>
Cc: linux-ext4@...r.kernel.org, akpm@...ux-foundation.org,
axboe@...nel.dk
Subject: Re: [PATCH -v2 6/6] ext4: use bio layer instead of buffer layer in
mpage_da_submit_io
On Mon, Oct 25, 2010 at 09:16:16AM +0400, Dmitry wrote:
> > + if (bio) {
> > + bio_get(io->io_bio);
> > + submit_bio(io->io_op, io->io_bio);
> > + BUG_ON(bio_flagged(io->io_bio, BIO_EOPNOTSUPP));
> Definitly this BUG_ON should be converted to ext4_error or something
> similar, otherwhise writeback attempt to removed usb-stick will be fatal
> for a whole system. IMHO it is reasonable to skip this check at all,
> because all work will be done in ext4_end_bio() anyway.
> > + bio_put(io->io_bio);
Cut and pasted from XFS. From what I could tell from the block I/O
layer, the only time the buffer I/O layer should return BIO_EOPNOTSUPP
is if we pass it a discard or barrier request, and we're doing neither
here. So I don't think it should trigger on a removed usb-stick.
At the same time, it's not clear what good the BUG_ON() is doing here,
either. So perhaps we could could drop the BUG_ON, at which point we
could drop the bio_get() and bio_put() calls, too. To be honest I'm
not entirely sure why the XFS code does this.
Jens? Any reason why I shouldn't just remove the bio_get(), the
BUG_ON()check, and bio_put() calls?
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists