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]
Message-ID: <20090113084229.GL30821@kernel.dk>
Date:	Tue, 13 Jan 2009 09:42:29 +0100
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Christoph Hellwig <hch@....de>, linux-kernel@...r.kernel.org
Subject: Re: new barrier warnings in 2.6.29-rc1

On Tue, Jan 13 2009, Tejun Heo wrote:
> (cc'ing Jens)
> Hello,
> 
> Christoph Hellwig wrote:
> > Whever a filesystem submits a bio with the barrier flag set but
> > the underlying hardware doesn't support it we now get errors in
> > the form of:
> > 
> > [ 3046.442629] end_request: I/O error, dev vdb, sector 0
> > 
> > since commit a7384677b2f4cd40948fd7ce024ba5e1821444ba which removed
> > the early check on the queue capabilities in __make_request.  I
> > think this message is pretty annoying and confusing for the user
> > as the filesystems already have more descriptive warnings, e.g. for
> > XFS:
> > 
> > [ 3046.455478] Filesystem "vdb": Disabling barriers, trial barrier write failed
> 
> I think the right thing to do is setting REQ_QUIET on the trial
> barrier request.

It would surely work, but XFS doesn't really have a way to do that. Then
we would have to add a bio quiet flag and inherit that.

I kind of liked the old behaviour. What about something like the below?

diff --git a/block/blk-core.c b/block/blk-core.c
index a824e49..eddba4a 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1448,6 +1448,11 @@ static inline void __generic_make_request(struct bio *bio)
 			err = -EOPNOTSUPP;
 			goto end_io;
 		}
+		if (bio_barrier(bio) && bio_has_data(bio) &&
+		    (q->next_ordered == QUEUE_ORDERED_NONE)) {
+			err = -EOPNOTSUPP;
+			goto end_io;
+		}
 
 		ret = q->make_request_fn(q, bio);
 	} while (ret);

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