xfs
[Top] [All Lists]

[Bug 365] Truncating a file over NFS+DMAPI hangs client

To: xfs-master@xxxxxxxxxxx
Subject: [Bug 365] Truncating a file over NFS+DMAPI hangs client
From: bugzilla-daemon@xxxxxxxxxxx
Date: Fri, 8 Oct 2004 16:17:57 -0700
Sender: linux-xfs-bounce@xxxxxxxxxxx
http://oss.sgi.com/bugzilla/show_bug.cgi?id=365





------- Additional Comments From mmontour@xxxxxxxxxx  2004-08-10 16:17 PDT 
-------
I've done more investigation and it looks like i_alloc_sem isn't actually held
at the time of the dm_send_data_event, if the truncate operation comes from NFS.

NFS nfsd_setattr calls notify_change which calls linvfs_setattr, but i_alloc_sem
is not set on this path (in fact, "grep" shows that nothing in fs/nfs mentions
i_alloc_sem). Local truncate operations go through do_truncate() in fs/open.c,
which downs i_alloc_sem before calling notify_change.

My temporary workaround is to call "down_write_trylock(&inode->i_alloc_sem)"
before the "up_write(&inode->i_alloc_sem)", and to skip the later down_write if
the down_write_trylock() indicates no contention. 




------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


<Prev in Thread] Current Thread [Next in Thread>