From: Jan Kara <jack@suse.cz>
To: "Kasatkin, Dmitry" <dmitry.kasatkin@intel.com>
Cc: "linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
linux-ext4@vger.kernel.org, Theodore Ts'o <tytso@mit.edu>
Subject: Re: ext4_readdir ignores filldir error code
Date: Mon, 24 Sep 2012 17:07:34 +0200 [thread overview]
Message-ID: <20120924150734.GE12264@quack.suse.cz> (raw)
In-Reply-To: <CALLzPKYO=Ccajri9Yv5OsZ=Z9X3=4n9NacqNmx4QC_Ra8yPpqQ@mail.gmail.com>
Hello,
On Mon 24-09-12 15:47:24, Kasatkin, Dmitry wrote:
> I noticed following in ext4_readdir() and in other file systems..
>
> filldir returns error in "error":
> error = filldir(dirent, de->name, ...)
>
> But function itself returns "ret"
>
> What I can see is that when filldir fails, ext4_readir quits, but with
> no error....
> while (!error && !stored && filp->f_pos < inode->i_size) {
>
>
> Is it by design or an error?
It works as designed (although I agree that the design is a bit odd).
Note that filler functions also set dirent->error which is then used by
e.g. getdents() syscall to set return value.
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
prev parent reply other threads:[~2012-09-24 15:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-09-24 12:47 ext4_readdir ignores filldir error code Kasatkin, Dmitry
2012-09-24 15:07 ` Jan Kara [this message]
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=20120924150734.GE12264@quack.suse.cz \
--to=jack@suse.cz \
--cc=dmitry.kasatkin@intel.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=tytso@mit.edu \
/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).