From: Neil Brown <neilb@cse.unsw.edu.au>
To: David Chow <davidchow@shaolinmicro.com>
Cc: linux-fsdevel@vger.kernel.org
Subject: Re: i_generation consistency
Date: Tue, 26 Nov 2002 23:58:53 +1100 [thread overview]
Message-ID: <15843.28685.348221.279411@notabene.cse.unsw.edu.au> (raw)
In-Reply-To: message from David Chow on Tuesday November 26
On Tuesday November 26, davidchow@shaolinmicro.com wrote:
> Hi Neil,
>
> I am writing a file system and having problem implementing the
> i_generation of the inode. Should the i_generation be persistent in the
> disk? Or it has to be changed every time the dcache shrinks or reload
> after read_inode()? Should I check the i_generation in the fh_dentry()
> ops and include it in file handle or leave it to the NFS clients and
> nfsd and I should forget about implementing i_generation in file
> handles. Can you please clarify? Thanks.
The core requirement is that dentry_to_fh must provide a
filehandle that fh_to_dentry can
1/ recoginise and find, even if it isn't in cache
2/ check that the inode that was found is still valid. i.e.
that it hasn't been re-used after the original was deleted.
This is sometimes done using a combination of
inode number, that can be used to locate a file, but that can be
reused after a file is removed, and a generation number,
that is stored in the inode and has a different value each time the
inode is reused (though this is not the only way to do it).
In this case, the generation number must be stored on stable
storage, and should be checked in fh_to_dentry.
Hope this helps.
NeilBrown
next prev parent reply other threads:[~2002-11-26 12:59 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-11-26 10:11 i_generation consistency David Chow
2002-11-26 12:58 ` Neil Brown [this message]
2002-11-28 6:28 ` David Chow
[not found] ` <3DE5B746.1040300@shaolinmicro.com>
2002-12-01 23:00 ` Neil Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=15843.28685.348221.279411@notabene.cse.unsw.edu.au \
--to=neilb@cse.unsw.edu.au \
--cc=davidchow@shaolinmicro.com \
--cc=linux-fsdevel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).