lkml.org 
[lkml]   [2010]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] raw: fsync method is now required
On Sun, 4 Apr 2010 10:45:23 +1000
Anton Blanchard <anton@samba.org> wrote:

>
> Commit 148f948ba877f4d3cdef036b1ff6d9f68986706a (vfs: Introduce new helpers for syncing after writing to O_SYNC file or IS_SYNC inode) broke the raw driver.
>
> We now call through generic_file_aio_write -> generic_write_sync ->
> vfs_fsync_range. vfs_fsync_range has:
>
> if (!fop || !fop->fsync) {
> ret = -EINVAL;
> goto out;
> }
>
> But drivers/char/raw.c doesn't set an fsync method.

So if you run fsync() against a /dev/rawX fd you get -EINVAL? erk.

> We have two options: fix it or remove the raw driver completely. I'm happy
> to do either, the fact this has been broken for so long suggests it is
> rarely used.

Well. It shows that fsync() is rarely used.

> The patch below adds an fsync method to the raw driver. My knowledge of the
> block layer is pretty sketchy so this could do with a once over.
>
> If we instead decide to remove the raw driver, this patch might still be
> useful as a backport to 2.6.33 and 2.6.32.

People go all whiny when I talk about removing raw.c. I gave up.


\
 
 \ /
  Last update: 2010-04-05 22:43    [W:0.168 / U:0.596 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site