[GSoC 2010][RESEND] Questions on Improved async/vector i/o support, fscache integration, and VFS change notification

Jeff Layton jlayton at samba.org
Sat Apr 3 04:46:41 MDT 2010

On Sat, 3 Apr 2010 12:16:34 +0200
Mohammed Gamal <m.gamal005 at gmail.com> wrote:

> Hello All,
> I am Mohammed Gamal, a student interested in joining Samba for GSoC
> 2010. I am mainly interested in kernel-level projects, and I have some
> questions that I'd appreciate some feedback for. I participated in
> GSoC 2008 for the Linux Foundation where I did some improvements for
> KVM's realmode support on VMX, and this was my first exposure to
> kernel-level coding. I have pretty good experience with C, and x86
> Assembly.
> - I am mainly interested in kernel-level projects, yet I am a kernel
> and Samba newbie. So my first question is whether it could be possible
> to join with this background, and would it work out?

Probably, though the projects you're asking about below might be a
little rough for a first time kernel project.

> - VFS change notification: My understanding on a very high level is
> that a mechanism is needed for the smb server to respond to
> inotfiy/dnotify calls, push these calls to the clients who have the
> corresponding shares mounted, and then reflect these changes on their
> ends. Is that understanding correct? And which operations need to be
> done in kernel space? Which other need to be done in userspace? And
> what are the boundaries between the two?

The CIFS/SMB protocol already supports asynchronous notification when a
file changes on the server (maybe directory too? not sure). This
project is about hooking CIFS up to this. The problem currently is that
the VFS doesn't call down into the lower filesystem when a program
wants to be notified of changes.

So that would have to be added at the VFS layer first, and then CIFS
would have to turn that into a call to set up notifications on the
server. You'd also have to have CIFS do a fanotify event when a file on
the server changes. This is all kernel-space stuff.

> - fscache Integration: My understanding is that it provides support
> for file systems to cache files and support disconnected operations,
> but I still have my share of reading to do about fscache, and perhaps
> need to look at how it's done in NFS. Are there any special
> considerations for this project? Can someone please give me some more
> insight on what exactly needs to be done?

You can think of fscache as sort of an extension of the page cache to
disk. It allows a network filesystem to cache data from the server onto
a local filesystem. It's a little difficult to be specific about what
needs to be done. You'll probably want to look closely at the existing
examples where fscache is used -- kAFS and NFS.

> - Improved async/vectored i/o support: My understanding is that this
> is not a "project" per se. But instead the student can work on
> tackling each of the suggested ideas (and others, as agreed with the
> mentors). Am I correct? And would this be a good play ground for a
> newbie?

I see it as a project, though you can probably deal with reads and
writes somewhat separately. There are also some nice-to-haves (request
merging for instance) that aren't specifically required to get this
working, but is good to consider with the design.

It just happens that I've given this one a bit more thought and put
those thoughts onto the ideas page to get it started. As with most
projects of this scale, you have to break things down into smaller,
achievable goals to get to the final result.

Jeff Layton <jlayton at samba.org>

More information about the samba-technical mailing list