Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andrew Morton
Date: Tuesday, April 29, 2008 - 1:54 pm

On Tue, 29 Apr 2008 11:42:48 +0800
"Bryan Wu" <cooloney@kernel.org> wrote:


Because those dentries have no backing store.  Their sole existance is in
the dentry cache which is normally reclaimable.  But we can't reclaim these
dentries because there is nowhere from where they can be reestablished.


Sucky heuristic.


Interesting.  Presumably it got reclaimed synchronously somehow.


I guess we should make the generic_setlease() heuristic smarter.

Of course the _reason_ for that heuristic is uncommented and lost in time. 
And one wonders what locking prevents it from being totally racy, and if
"none", what happens when the race hits.  Sigh.

I suppose a stupid fix would be to set (and later clear) a new flag in
dentry.d_flags which means

  this dentry is pinned by a ram-backed device, so d_count==2 means
  "unused""

But it would be better to work out exactly what generic_setlease() is
trying to do there, and do it in a better way.
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, Bryan Wu, (Mon Apr 28, 8:42 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, Andrew Morton, (Tue Apr 29, 1:54 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, J. Bruce Fields, (Tue Apr 29, 2:42 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, Mike Frysinger, (Tue Apr 29, 3:01 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, J. Bruce Fields, (Tue Apr 29, 3:11 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, Mike Frysinger, (Tue Apr 29, 3:15 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, Matthew Wilcox, (Tue Apr 29, 3:21 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, david m. richter, (Tue Apr 29, 4:21 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, J. Bruce Fields, (Wed Apr 30, 10:50 am)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, david m. richter, (Wed Apr 30, 11:14 am)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, Al Viro, (Wed Apr 30, 11:24 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, Al Viro, (Wed Apr 30, 11:33 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, J. Bruce Fields, (Fri May 2, 3:22 pm)
Re: [LTP/VFS] fcntl SETLEASE fails on ramfs/tmpfs, J. Bruce Fields, (Fri May 2, 3:26 pm)