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: <20100422103953.GB27497@kernel.dk>
Date:	Thu, 22 Apr 2010 12:39:53 +0200
From:	Jens Axboe <jens.axboe@...cle.com>
To:	Jörn Engel <joern@...fs.org>
Cc:	David Woodhouse <dwmw2@...radead.org>,
	linux-mtd@...ts.infradead.org, linux-kernel@...r.kernel.org,
	Christoph Hellwig <hch@...radead.org>
Subject: Re: [PATCH] [MTD] Fix JFFS2 sync silent failure

On Thu, Apr 22 2010, Jens Axboe wrote:
> On Thu, Apr 22 2010, Jörn Engel wrote:
> > On Mon, 19 April 2010 12:20:56 +0200, Jens Axboe wrote:
> > > 
> > > Thanks, we definitely should have put a debug statement to catch this in
> > > from day 1, good debugging should be an important part of any new
> > > infrastructure.
> > 
> > Woke up early and had another look at this.  Looks like a much more
> > widespread problem.  Based on a quick grep an uncaffeinated brain:
> > 
> > 9p	no s_bdi
> > afs	no s_bdi
> > ceph	creates its own s_bdi
> > cifs	no s_bdi
> > coda	no s_bdi
> > ecryptfs no s_bdi
> > exofs	no s_bdi
> > fuse	creates its own s_bdi?
> > gfs2	creates its own s_bdi?
> > jffs2	patch exists
> > logfs	fixed now
> > ncpfs	no s_bdi
> > nfs	creates its own s_bdi
> > ocfs2	no s_bdi
> > smbfs	no s_bdi
> > ubifs	creates its own s_bdi
> > 
> > I excluded all filesystems that appear to be read-only, block device
> > based or lack any sort of backing store.  So there is a chance I have
> > missed some as well.
> 
> It's funky, I was pretty sure there was/is code to set a default bdi for
> non-bdev file systems. It appears to be missing, that's not good. So
> options include:
> 
> - Add the appropriate per-sb bdi for these file systems (right fix), or
> - Pre-fill default_backing_dev_info as a fallback ->s_bdi to at least
>   ensure that data gets flushed (quick fix)
> 
> I'll slap together a set of fixes for this.

Here's a series for fixing these. At this point they are totally
untested except that I did compile them. Note that your analysis
appeared correct for all cases but ocfs2, which does use get_sb_bdev()
and hence gets ->s_bdi assigned.

You can see them here, I'll post the series soon:

http://git.kernel.dk/?p=linux-2.6-block.git;a=shortlog;h=refs/heads/for-linus

The first patch is a helper addition, the rest are per-fs fixups.

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