linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: "Jan Engelhardt" <jengelh@linux01.gwdg.de>,
	"Jörn Engel" <joern@lazybastard.org>,
	"Andrew Morton" <akpm@osdl.org>,
	linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org,
	"Dave Kleikamp" <shaggy@linux.vnet.ibm.com>,
	"David Chinner" <dgc@sgi.com>
Subject: Re: [PATCH 1/2] LogFS proper
Date: Tue, 8 May 2007 20:17:03 +0400	[thread overview]
Message-ID: <20070508161703.GA18035@2ka.mipt.ru> (raw)
In-Reply-To: <1178639681.3042.334.camel@localhost.localdomain>

On Tue, May 08, 2007 at 05:54:41PM +0200, Thomas Gleixner (tglx@linutronix.de) wrote:
> On Tue, 2007-05-08 at 14:46 +0200, Jan Engelhardt wrote:
> > >> +static int __logfs_readdir(struct file *file, void *buf, filldir_t filldir)
> > >> +{
> > >> +		err = read_dir(dir, &dd, pos);
> > >> +		if (err == -EOF)
> > >> +			break;
> > >
> > >	-EOF results in a return code 0 ?
> > 
> > Results in a return code -256.
> 
> Really ? It breaks out of the loop and returns 0 !

Likely it was done with intention - readdir returns 0 on EOF and NULL
direntry, in Jörn's code subsequent readdir call will return EOF 
again and filldir callback will not be called, so NULL will be 
returned to userspace.

-- 
	Evgeniy Polyakov

  reply	other threads:[~2007-05-08 16:17 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-07 21:59 [PATCH 0/2] LogFS take two Jörn Engel
2007-05-07 22:00 ` [PATCH 1/2] LogFS proper Jörn Engel
2007-05-07 22:10   ` Jörn Engel
2007-05-07 22:11   ` Jörn Engel
2007-05-08  7:22   ` Thomas Gleixner
2007-05-08 12:46     ` Jan Engelhardt
2007-05-08 15:54       ` Thomas Gleixner
2007-05-08 16:17         ` Evgeniy Polyakov [this message]
2007-05-09 13:06           ` Jan Engelhardt
2007-05-08 16:32     ` Jörn Engel
2007-05-08 18:00       ` Thomas Gleixner
2007-05-08 20:25         ` Jörn Engel
2007-05-08 20:58           ` Thomas Gleixner
2007-05-08 21:30             ` Jörn Engel
2007-05-08 19:15       ` Pekka Enberg
2007-05-08 20:58         ` Jörn Engel
2007-05-08 22:52           ` Greg KH
2007-05-08 23:10             ` Jörn Engel
2007-05-09  0:01               ` Greg KH
2007-05-09 10:24                 ` Jörn Engel
2007-05-08 22:44     ` Ingo Oeser
2007-05-08 23:05       ` Jörn Engel
2007-05-07 22:01 ` [PATCH 2/2] introduce I_SYNC Jörn Engel
2007-05-08  7:23   ` Thomas Gleixner
2007-05-08 12:00     ` Jörn Engel
2007-05-08  7:39 ` [PATCH 0/2] LogFS take two Thomas Gleixner
2007-05-08 11:41   ` Jörn Engel

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=20070508161703.GA18035@2ka.mipt.ru \
    --to=johnpol@2ka.mipt.ru \
    --cc=akpm@osdl.org \
    --cc=dgc@sgi.com \
    --cc=jengelh@linux01.gwdg.de \
    --cc=joern@lazybastard.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=shaggy@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /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).