From: Andrew Morton <akpm@linux-foundation.org>
To: Anton Blanchard <anton@samba.org>
Cc: Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Jens Axboe <jens.axboe@oracle.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] raw: fsync method is now required
Date: Mon, 5 Apr 2010 13:39:02 -0700 [thread overview]
Message-ID: <20100405133902.082a6ef7.akpm@linux-foundation.org> (raw)
In-Reply-To: <20100404004523.GL5594@kryten>
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.
next prev parent reply other threads:[~2010-04-05 20:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-04 0:45 [PATCH] raw: fsync method is now required Anton Blanchard
2010-04-05 20:39 ` Andrew Morton [this message]
2010-04-05 20:42 ` Christoph Hellwig
2010-04-06 15:14 ` Jeff Moyer
2010-04-06 15:34 ` Jan Kara
2010-04-06 17:44 ` Christoph Hellwig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100405133902.082a6ef7.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=anton@samba.org \
--cc=hch@lst.de \
--cc=jack@suse.cz \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox