Re: [RFC] readdir mess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Aug 15, 2008 at 09:58:31AM -0700, Linus Torvalds wrote:

> because the "filldir()" functions should all do the right thing anyway. 
> But there's certainly nothing wrong with doing it either.

Not all, but those won't hit coda.
 
> However, I think the real fix is something like this. This 
> 
>  - fixes all the callers
> 
>  - removes more lines than it adds
> 
>  - simplifies and clarifies the code
> 
>  - avoids pointless goto's
> 
>  - makes error handling of vfs_readdir() consistent among the callers
>    (some callers already did the error handling _correctly_ before this 
>    patch - this makes everybody do it the same way)

One obvious note: that'll break old_readdir() on coda.  There you need to
change the existing check (you need to check buf.result, then ignore error
unless buf.result ended up 0).

I agree that such transition plan makes sense, but that'll take more
preliminary work than in your patch; there are other vfs_readdir() and
->readdir() callers, not just the obvious syscall ones.

BTW, there are several places that call specific foo_readdir() or its helper
functions, passing odd stuff as filldir (afs implements ->lookup() that way,
for one; ocfs2 checks that directory is empty; gfs2 does ->get_name() -
with filldir returning 1 on match, at that; etc.).  We obviously do not care
about those in the beginning of patch series - they won't be affected,
but once we start converting foofs_readdir() to returning what filldir had
returned, we'll need to watch out for complications from those (BTW, another
fun place in that respect is __fat_readdir())
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux