From: Edward Shishkin <edward.shishkin@gmail.com>
To: Ivan Shapovalov <intelfx100@gmail.com>
Cc: reiserfs-devel@vger.kernel.org
Subject: Re: [PATCH] reiser4: remove an assertion "nikita-2577" which is no longer possible to check.
Date: Tue, 06 May 2014 09:22:07 +0200 [thread overview]
Message-ID: <53688D9F.4090101@gmail.com> (raw)
In-Reply-To: <1399334388-9660-1-git-send-email-intelfx100@gmail.com>
On 05/06/2014 01:59 AM, Ivan Shapovalov wrote:
> Since 3.11, file->f_pos is not up-to-date during an iterate() in progress. This
> was true for readdir(), but is no longer so.
>
> Signed-off-by: Ivan Shapovalov <intelfx100@gmail.com>
> ---
>
> Is this correct? I assume that adjust_dir_pos() is called simultaneously with
> iterate()... or not?
adjust_dir_pos() is a work around seekdir/telldir API, and has nothing
with iterate(), see the comment before reiser4_iterate_common().
So, I think, it is incorrect, and dir->f_pos is perfectly valid.
> If not, then passing 'dir->f_pos' to reiser4_get_dir_fpos()
> will suffice.
>
> fs/reiser4/plugin/file_ops_readdir.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/fs/reiser4/plugin/file_ops_readdir.c b/fs/reiser4/plugin/file_ops_readdir.c
> index 0da5ac5..f53573c 100644
> --- a/fs/reiser4/plugin/file_ops_readdir.c
> +++ b/fs/reiser4/plugin/file_ops_readdir.c
> @@ -58,8 +58,6 @@ adjust_dir_pos(struct file *dir, struct readdir_pos *readdir_spot,
> /* logical number of directory entry readdir is "looking" at
> * changes */
> readdir_spot->entry_no += adj;
> - assert("nikita-2577",
> - ergo(dir != NULL, reiser4_get_dir_fpos(dir) + adj >= 0));
> if (de_id_cmp(&pos->dir_entry_key,
> &mod_point->dir_entry_key) == EQUAL_TO) {
> assert("nikita-2575", mod_point->pos < pos->pos);
next prev parent reply other threads:[~2014-05-06 7:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-05 23:59 [PATCH] reiser4: remove an assertion "nikita-2577" which is no longer possible to check Ivan Shapovalov
2014-05-06 7:22 ` Edward Shishkin [this message]
2014-05-06 11:18 ` [PATCHv2] reiser4: fix an assertion broken since 3.11 Ivan Shapovalov
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=53688D9F.4090101@gmail.com \
--to=edward.shishkin@gmail.com \
--cc=intelfx100@gmail.com \
--cc=reiserfs-devel@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).