From: Srinivas.Narendula@libnet.com Srinivas.Narendula@libnet.com
Subject: [9fans] reuse of values of qid.path
Date: Fri, 5 Jun 1998 09:18:00 -0400 [thread overview]
Message-ID: <19980605131800.8E8jEN9FSKeRsjngZip33Pn7DZk_pp9uLivhGNjJ-mw@z> (raw)
How important is it to not reuse old values of qid.path?
The current fileserver uses sb->qidgen to give a new file/dir
a new path value, but allows duplicates since there is no
handling of overflow. There is a "check" command option called
"setqid" to resequence the qids if qidgen is in danger of overflow,
but was not implemented.
Having two files/directories with the same qid.path is a "bad thing",
but is possible in the current system.
It seems that qid.path is used like an inode number (and in fact is
the device and inode number in u9fs). If that is the case, then
instead of using qidgen, use the block address of the directory
block shifted by the size of the slot and or'ed with the slot.
qid.path = (p->addr << log2(DIRPERBUF)) | (slot % DIRPERBUF);
The only problem is that the sequence:
cp file_of_size_x a
rm a
cp different_file_of_size_x a
would result in the two files having the same qid and so would
cp file_of_size_x a
rm a
cp different_file_of_size_x b
but
cp file_of_size_x a
cp different_file_of_size_x a
would not (since cp does a truncate before a create).
So again, how important is that?
David Butler
gdb@dbSystems.com
next reply other threads:[~1998-06-05 13:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-06-05 13:18 Srinivas.Narendula [this message]
-- strict thread matches above, loose matches on Subject: below --
1998-06-05 13:23 Srinivas.Narendula
1998-06-05 13:12 Srinivas.Narendula
1998-06-03 23:48 philw
1998-06-03 19:16 G.David
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=19980605131800.8E8jEN9FSKeRsjngZip33Pn7DZk_pp9uLivhGNjJ-mw@z \
--to=srinivas.narendula@libnet.com \
/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).