Re: Does NFS4 need st_gen?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"J. Bruce Fields" <bfields@xxxxxxxxxxxx> writes:
> On Wed, Oct 19, 2011 at 03:11:27PM -0400, Nikolaus Rath wrote:
>> "J. Bruce Fields" <bfields@xxxxxxxxxxxx> writes:
>> > On Wed, Oct 19, 2011 at 10:17:43AM -0400, Nikolaus Rath wrote:
>> >> Does NFS4 still depend on inode generation numbers? I understand that
>> >> earlier NFS versions used file handles based on inode and generation
>> >> number, but it seems to me that this shouldn't be required anymore with
>> >> the (stateful) NFS4.
>> >
>> > Yes, it's true that NFSv4 has open and close operations, but filehandles
>> > are still used a great deal outside of that, and clients are still
>> > allowed to assume that the same filehandle always refers to the same
>> > object.
>> >
>> > http://www.ietf.org/rfc/rfc3530.txt, section 4.2.1:
>> >
>> > 	"If two filehandles from the same server are equal, they MUST
>> > 	refer to the same file."
>> 
>> Duh - that's a disappointment. Thanks for the pointer!
>
> Just curious--why do you care?

I'm working on a FUSE file system that stores file system metadata in an
SQL database (http://code.google.com/p/s3ql/). Not having to keep track
of inode generation numbers would keep the code much simpler, because I
want to delete inode-rows from the SQL table when the last reference to
the inode is deleted (so I can't keep track of the generation no).

Now I'll either have to make inodes unique (and run into trouble after
2^32 inodes have been used), or keep with the current scheme of
randomizing new inodes (which keeps the probability of problems low
enough but is ugly).

Best,

   -Nikolaus

-- 
 »Time flies like an arrow, fruit flies like a Banana.«

  PGP fingerprint: 5B93 61F8 4EA2 E279 ABF6  02CF A9AD B7F8 AE4E 425C

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux