[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20140514204304.94b0703f593626c2ea6f9465@skynet.be>
Date: Wed, 14 May 2014 20:43:04 +0200
From: Fabian Frederick <fabf@...net.be>
To: Andrew Morton <akpm@...ux-foundation.org>
Cc: linux-kernel <linux-kernel@...r.kernel.org>, jack <jack@...e.cz>,
hch <hch@...radead.org>, Viro <viro@...iv.linux.org.uk>,
tytso <tytso@....edu>
Subject: Re: [PATCH V5 1/2] FS: Add generic data flush to fsync
On Mon, 12 May 2014 14:50:27 -0700
Andrew Morton <akpm@...ux-foundation.org> wrote:
> On Mon, 12 May 2014 07:20:27 +0200 Fabian Frederick <fabf@...net.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists