public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [2.6.29-rc5][BUG] swapon on vfat file gets stuck on inode lock
@ 2009-03-11 13:57 Laurent GUERBY
  2009-03-11 15:53 ` Linus Torvalds
  0 siblings, 1 reply; 7+ messages in thread
From: Laurent GUERBY @ 2009-03-11 13:57 UTC (permalink / raw)
  To: linux-kernel; +Cc: OGAWA Hirofumi, Linus Torvalds

Hi,

With 2.6.29-rc5 (on an ARM platform but I don't think it's significant)
when I try to enable swap on a file which is on an USB mounted vfat
partition the swapon syscall gets stuck:

swapon        D c03780d4     0 22361      1
[<c0377db0>] (schedule+0x0/0x3ac) from [<c0378e50>] (__mutex_lock_slowpath+0x94/0xf4)
[<c0378dbc>] (__mutex_lock_slowpath+0x0/0xf4) from [<c0378c40>] (mutex_lock+0x20/0x24)
 r6:df49e808 r5:00000000 r4:00000000
[<c0378c20>] (mutex_lock+0x0/0x24) from [<c013bb2c>] (_fat_bmap+0x28/0x68)
[<c013bb04>] (_fat_bmap+0x0/0x68) from [<c00af910>] (bmap+0x2c/0x40)
 r6:0005ffff r5:00000000 r4:00000000
[<c00af8e4>] (bmap+0x0/0x40) from [<c0094b84>] (sys_swapon+0x630/0xcbc)
 r5:c0541510 r4:00300000
[<c0094554>] (sys_swapon+0x0/0xcbc) from [<c0029960>] (ret_fast_syscall+0x0/0x2c)

Looking around in the kernel sources it looks like the inode mutex is
taken both by mm/swapfile.c and by fs/fat/inode.c, the latter one since
this patch from november 2008:

http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=fa93ca18a8b0da4e26bd9491ad144cd14d22f8ec

When I use a loopback device on the very same file the swapon call works
so there's an easy workaround for this issue.

Sincerely,

Laurent
http://guerby.org/blog


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-03-16  8:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-11 13:57 [2.6.29-rc5][BUG] swapon on vfat file gets stuck on inode lock Laurent GUERBY
2009-03-11 15:53 ` Linus Torvalds
2009-03-11 16:45   ` Laurent GUERBY
2009-03-11 17:03   ` OGAWA Hirofumi
2009-03-11 18:13     ` OGAWA Hirofumi
2009-03-11 18:19       ` Linus Torvalds
2009-03-16  8:34   ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox