mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bart Trojanowski <bart@jukie.net>
To: Linus Torvalds <torvalds@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Cc: Al Viro <viro@zeniv.linux.org.uk>
Subject: Re: vfat BKL/lock_super regression in v2.6.26-rc3-g8f59342
Date: Tue, 19 Aug 2008 20:03:39 -0400	[thread overview]
Message-ID: <20080820000339.GB28029@jukie.net> (raw)
In-Reply-To: <alpine.LFD.1.10.0808191505590.3324@nehalem.linux-foundation.org>

* Linus Torvalds <torvalds@linux-foundation.org> [080819 18:19]:
> And I think you hit this issue because you probably mounted the USB stick 
> as a "sync" (or dirsync) mount - which is what some distros do by default, 
> even if it is known to cause problems for some flash cards that don't do a 
> good job at wear levelling.

You're right.  I turned on sync a while back so I could just pull the
stick out w/o the need to do a manual sync... probably not a good idea
on my part with respect to the wear of the media.

> But it's good that you did that, because all _my_ testing (which was 
> admittedly very deficient) had been done with a default mount without that 
> thing.

My ignorance paid off!

> Btw, quite often, the right solution may be to remove one of the locks 
> entirely. FAT should actually have been largely BKL free, and my 
> conversion of BKL to super-lock was "overly eager" exactly because it's 
> easier to find deadlocks (and debug things carefully and handle them as 
> they pop up) than it is to find races (which are almost impossible to 
> debug and pinpoint).

I totally agree.  After spending a couple of hours (while doing other
things) bisecting the tree, I found the commit that introduced the
regression.  In contrast, I was able to find the double-lock in 5
minutes.

> In particular, I think fat_write_inode() really is safe.

I wasn't sure there.

> So I'm pretty sure the right fix is to just remove [un]lock_super() 
> entirely from fat_write_inode(). 

Ok, I will test your patch and let you know in a few minutes.

-Bart

-- 
				WebSig: http://www.jukie.net/~bart/sig/

  reply	other threads:[~2008-08-20  0:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-19 22:03 Bart Trojanowski
2008-08-19 22:06 ` [PATCH] make lock_super recursive to simulate BKL Bart Trojanowski
2008-08-19 22:21   ` Linus Torvalds
2008-08-20  1:14     ` Bart Trojanowski
2008-08-19 22:17 ` vfat BKL/lock_super regression in v2.6.26-rc3-g8f59342 Linus Torvalds
2008-08-20  0:03   ` Bart Trojanowski [this message]
2008-08-20  0:11     ` Linus Torvalds
2008-08-20  0:24       ` Bart Trojanowski
2008-08-20  0:18   ` Bart Trojanowski
2008-08-20  0:43     ` Linus Torvalds
2008-08-20  0:56       ` Linus Torvalds
2008-08-20  2:27         ` Bart Trojanowski
2008-08-20 21:23           ` Diego Calleja
2008-08-23  0:54           ` [PATCH] document additional vfat mount options Bart Trojanowski
2008-08-23  2:33             ` Grant Coady
2008-08-23  3:12               ` Bart Trojanowski
2008-08-23  3:14                 ` Bart Trojanowski
2008-08-23  3:27                   ` OGAWA Hirofumi
2008-08-23 13:11                     ` Bart Trojanowski
2008-08-23 14:47                       ` OGAWA Hirofumi
2008-08-23  3:10             ` OGAWA Hirofumi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080820000339.GB28029@jukie.net \
    --to=bart@jukie.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=viro@zeniv.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®