[lkml]   [2011]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v3] introduce sys_syncfs to sync a single file system
On Sat, March 12, 2011 00:56, Jonathan Nieder wrote:
> Indan Zupancic wrote:
>> If there still is a good reason to implement this, please don't add it
>> as a new system call, but add it to sync_file_range(), as that seems
>> the best place for odd file synchronisation operations.
> I have no strong preference about how this is added (and in fact I'm
> quite ignorant about the usual conventions), but:

I'm not pushing for any official convention, just what seems good taste.

> - as a sysadmin, it really _would_ be nice to be able to say
> "sync /usr" to sync /usr;

This is independent of the implementation.

> - the existing functionality of sync_file_range is about controlling
> writeback behavior for files, not mounts.

True, but what happens when you sync a mount? In the end it's about odd,
non-standard syncing behaviour, so I think it fits sync_file_range well.
Like sync_file_range, it's trickier to use than it seems at first, so it
fits well with the other "keep this in mind before using it" requirements.

> So unless there is a shortage of syscall numbers or something, I find
> the request to omit this or tack it onto sync_file_range odd. Could
> you explain the benefit?

Less code added, less bloat. Architecture independent, no need to update
all system call tables everywhere (all archs, libc versions and strace).
Two files changed, instead of 7 (which only hooks up x86). The code ends
up near the code it calls, so it makes contextual sense.

As for the reason not to add it at all, well, if everything that seemed
a good idea at the time was added as a system call it would be an even
bigger mess than it already is. So it doesn't have to be a bad idea to
not make it, not being useful enough is sufficient.

In this case it's just a performance improvement over sync(2). It doesn't
add a new feature. Main argument given for the performance problem seems
to be "NFS can be slow". Anything else?



 \ /
  Last update: 2011-03-12 02:55    [W:0.093 / U:5.736 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site