From: Fabian Frederick <fabf@skynet.be>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>, jack <jack@suse.cz>,
hch <hch@infradead.org>, Viro <viro@zeniv.linux.org.uk>,
tytso <tytso@mit.edu>
Subject: Re: [PATCH V5 1/2] FS: Add generic data flush to fsync
Date: Wed, 14 May 2014 20:43:04 +0200 [thread overview]
Message-ID: <20140514204304.94b0703f593626c2ea6f9465@skynet.be> (raw)
In-Reply-To: <20140512145027.e60426e59d99961236344827@linux-foundation.org>
On Mon, 12 May 2014 14:50:27 -0700
Andrew Morton <akpm@linux-foundation.org> wrote:
> On Mon, 12 May 2014 07:20:27 +0200 Fabian Frederick <fabf@skynet.be> wrote:
>
> > This patch issues a flush in generic_file_fsync.
> > (Modern filesystems already do it)
> >
> > Behaviour can be reversed using /sys/devices/.../cache_type
> > or by calling __generic_file_fsync
>
> Well OK, but why? What effect does the patch have? Does it make the
> kernel better and if so, how?
>
> >
> > +/**
> > + * generic_file_fsync - generic fsync implementation for simple filesystems
> > + * with flush
> > + * @file: file to synchronize
> > + * @start: start offset in bytes
> > + * @end: end offset in bytes (inclusive)
> > + * @datasync: only synchronize essential metadata if true
> > + *
> > + */
> > +
> > +int generic_file_fsync(struct file *file, loff_t start, loff_t end,
> > + int datasync)
> > +{
> > + struct inode *inode = file->f_mapping->host;
> > + int err;
> > +
> > + err = __generic_file_fsync(file, start, end, datasync);
> > + if (err)
> > + return err;
> > +
> > + return blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL, NULL);
> > +
> > +}
>
> Documentation/SubmitChecklist, section 2b ;)
Hi Andrew,
As Jan suggested, I can resubmit patches with #ifdef CONFIG_BLOCK around
blkdev_issue_flush and further description. Do you see something else ?
Thanks,
Fabian
prev parent reply other threads:[~2014-05-14 18:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 5:20 Fabian Frederick
2014-05-12 21:50 ` Andrew Morton
2014-05-14 17:15 ` Debabrata Banerjee
2014-05-14 18:43 ` Fabian Frederick [this message]
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=20140514204304.94b0703f593626c2ea6f9465@skynet.be \
--to=fabf@skynet.be \
--cc=akpm@linux-foundation.org \
--cc=hch@infradead.org \
--cc=jack@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
--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
all inboxes | Powered by JetHome®