From: Vladimir Saveliev <vs@namesys.com>
To: "Artem B. Bityuckiy" <dedekind@yandex.ru>
Cc: reiserfs-list@namesys.com
Subject: Re: Reiser4 + seekdir()
Date: Mon, 27 Jun 2005 15:41:41 +0400 [thread overview]
Message-ID: <1119872500.4257.260.camel@tribesman.namesys.com> (raw)
In-Reply-To: <42BFC6B0.7040202@yandex.ru>
Hello
On Mon, 2005-06-27 at 13:28, Artem B. Bityuckiy wrote:
> Hello,
>
> I was investigating Riser4 readdir() handling. As the result I've
> realized the following:
>
> 1. repeatable readdir() calls should work well.
> 2. seekdir()/telldir() mustn't work. (because per_file readdir_pos
> stores only the _last_ f_pos->{key, entry_no, position} mapping, so the
> mapping will be lost on the next readdir(), and the previous seekdir()
> will be lost too).
>
> But probably I don't quite well understand what's going on. Here is the
> list of things which makes me doubt.
>
> 1. There are two types of directory plugins: HASHED_DIR_PLUGIN_ID and
> SEEKABLE_HASHED_DIR_PLUGIN_ID. The latter is claimed as "hashed
> directory for which seekdir/telldir are guaranteed to work". I don't
> understand how can it work.
Location within a directory in reiser4 is logical number of entry within
the directory.
> Could somebody please point me the code
> which implements seekdir() (seekdir is actually
> lseek(fd,saved_position,SEEK_SET) in glibc) ? For me it looks like both
> must not support telldir()/seekdir() ...
>
fs/reiser4/plugin/dir/dir.c:seek_dir()
You may also want to read a comment before
fs/reiser4/plugin/dir/dir.c:readdir_common and comment named "STATELESS
READDIR" in the fs/reiser4/plugin/dir/dir.c.
> 2. Why you store {entry_no, position, key} in readdir_pos instead of
> just storing the full name string ? In that case you would not need
> adjust_dir_pos() at all ...
>
we can not return entry key to telldir, on seekdir we have to be able to
position within a directory by off_t - therefore, we need adjust_dir_pos
anyway.
next prev parent reply other threads:[~2005-06-27 11:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-06-27 9:28 Reiser4 + seekdir() Artem B. Bityuckiy
2005-06-27 11:41 ` Vladimir Saveliev [this message]
2005-06-27 12:09 ` Artem B. Bityuckiy
2005-06-27 12:39 ` Vladimir Saveliev
2005-06-27 12:57 ` Artem B. Bityuckiy
2005-06-27 13:49 ` Vladimir Saveliev
2005-06-27 13:53 ` Artem B. Bityuckiy
2005-06-27 19:50 ` Hans Reiser
2005-06-29 6:51 ` Artem B. Bityuckiy
2005-06-29 10:22 ` Vladimir Saveliev
2005-06-29 10:29 ` Artem B. Bityuckiy
2005-06-29 11:48 ` Vladimir Saveliev
2005-06-29 18:11 ` Valdis.Kletnieks
2005-06-30 16:26 ` Vladimir Saveliev
2005-06-27 18:09 ` Hans Reiser
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=1119872500.4257.260.camel@tribesman.namesys.com \
--to=vs@namesys.com \
--cc=dedekind@yandex.ru \
--cc=reiserfs-list@namesys.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.