Trond Myklebust wrote: > On Tue, 2007-06-05 at 15:10 -0400, Peter Staubach wrote: > >> Hi. >> >> Attached is a small patch to allow file systems to inform the file >> system independent layers that they don't support file leases. >> >> The problem is that some file system such as NFSv2 and NFSv3 do >> not have sufficient support to be able to support leases correctly. >> In particular for these two file systems, there is no over the wire >> protocol support. >> >> Currently, these two file systems fail the fcntl(F_SETLEASE) call >> accidently, due to a reference counting difference. These file systems >> should fail more consciously, with a proper error to indicate that >> the call is invalid for them. >> >> Thanx... >> >> ps >> plain text document attachment (devel.tototoday) >> --- linux-2.6.21.i686/fs/nfs/super.c.org >> +++ linux-2.6.21.i686/fs/nfs/super.c >> @@ -522,6 +522,9 @@ static inline void nfs_initialise_sb(str >> >> sb->s_magic = NFS_SUPER_MAGIC; >> >> + if (server->nfs_client->cl_nfsversion < 4) >> + sb->s_flags |= MS_NO_LEASES; >> + >> > > This should be unconditional since we have no support for "lease locks" > under NFSv4 either. The NFSv4 concept of leases and delegations is very > different, since it is really tied to the ability to cache data. No problem. I wasn't sure, what with the changes that Bruce Fields is constructing. Attached is the simplified version. Thanx... ps