Re: [RFC] f_pos in readdir() (was Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex)

2013-02-25 Thread Zach Brown
> As for ->readdir(), I'd like to resurrect an old proposal to change the ABI > of that sucker. Quoting the thread from 4 years ago: I'd love to see the readdir() interface cleaned up, yes please. > Comments? Hmm. Do we want to think about letting callers copy the name to userspace in fragment

Re: [RFC] f_pos in readdir() (was Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex)

2013-02-24 Thread Li Zefan
>> We can fix this bug in each filesystem, but can't we just make sure i_mutex >> is >> acquired in lseek(), read(), write() and readdir() for directory file >> operations? >> >> (the patch is for demonstration only) > > No. This is a very massive overkill. If anything, we want to *reduce* the

[RFC] f_pos in readdir() (was Re: [RFC][PATCH] vfs: always protect diretory file->fpos with inode mutex)

2013-02-23 Thread Al Viro
On Tue, Feb 19, 2013 at 09:22:40AM +0800, Li Zefan wrote: > There's a long long-standing bug...As long as I don't know when it dates > from. > > I've written and attached a simple program to reproduce this bug, and it can > immediately trigger the bug in my box. It uses two threads, one keeps call