* [PATCH 10/14] HPFS: Implement fsync for hpfs
@ 2011-05-08 18:44 Mikulas Patocka
2011-05-10 8:03 ` Christoph Hellwig
0 siblings, 1 reply; 3+ messages in thread
From: Mikulas Patocka @ 2011-05-08 18:44 UTC (permalink / raw)
To: Linus Torvalds; +Cc: linux-kernel, linux-fsdevel
Implement fsync for hpfs.
Signed-off-by: Mikulas Patocka <mikulas@artax.karlin.mff.cuni.cz>
---
fs/hpfs/file.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6.39-rc5-fast/fs/hpfs/file.c
===================================================================
--- linux-2.6.39-rc5-fast.orig/fs/hpfs/file.c 2011-05-05 01:02:43.000000000 +0200
+++ linux-2.6.39-rc5-fast/fs/hpfs/file.c 2011-05-05 01:02:56.000000000 +0200
@@ -20,8 +20,8 @@ static int hpfs_file_release(struct inod
int hpfs_file_fsync(struct file *file, int datasync)
{
- /*return file_fsync(file, datasync);*/
- return 0; /* Don't fsync :-) */
+ struct inode *inode = file->f_mapping->host;
+ return sync_blockdev(inode->i_sb->s_bdev);
}
/*
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 10/14] HPFS: Implement fsync for hpfs
2011-05-08 18:44 [PATCH 10/14] HPFS: Implement fsync for hpfs Mikulas Patocka
@ 2011-05-10 8:03 ` Christoph Hellwig
2011-05-11 13:03 ` Mikulas Patocka
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Hellwig @ 2011-05-10 8:03 UTC (permalink / raw)
To: Mikulas Patocka; +Cc: Linus Torvalds, linux-kernel, linux-fsdevel
On Sun, May 08, 2011 at 08:44:19PM +0200, Mikulas Patocka wrote:
> Index: linux-2.6.39-rc5-fast/fs/hpfs/file.c
> ===================================================================
> --- linux-2.6.39-rc5-fast.orig/fs/hpfs/file.c 2011-05-05 01:02:43.000000000 +0200
> +++ linux-2.6.39-rc5-fast/fs/hpfs/file.c 2011-05-05 01:02:56.000000000 +0200
> @@ -20,8 +20,8 @@ static int hpfs_file_release(struct inod
>
> int hpfs_file_fsync(struct file *file, int datasync)
> {
> - /*return file_fsync(file, datasync);*/
> - return 0; /* Don't fsync :-) */
> + struct inode *inode = file->f_mapping->host;
> + return sync_blockdev(inode->i_sb->s_bdev);
So you push all dirty data into buffers immediately and don't have
anything else to write back?
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 10/14] HPFS: Implement fsync for hpfs
2011-05-10 8:03 ` Christoph Hellwig
@ 2011-05-11 13:03 ` Mikulas Patocka
0 siblings, 0 replies; 3+ messages in thread
From: Mikulas Patocka @ 2011-05-11 13:03 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: Linus Torvalds, linux-kernel, linux-fsdevel
On Tue, 10 May 2011, Christoph Hellwig wrote:
> On Sun, May 08, 2011 at 08:44:19PM +0200, Mikulas Patocka wrote:
> > Index: linux-2.6.39-rc5-fast/fs/hpfs/file.c
> > ===================================================================
> > --- linux-2.6.39-rc5-fast.orig/fs/hpfs/file.c 2011-05-05 01:02:43.000000000 +0200
> > +++ linux-2.6.39-rc5-fast/fs/hpfs/file.c 2011-05-05 01:02:56.000000000 +0200
> > @@ -20,8 +20,8 @@ static int hpfs_file_release(struct inod
> >
> > int hpfs_file_fsync(struct file *file, int datasync)
> > {
> > - /*return file_fsync(file, datasync);*/
> > - return 0; /* Don't fsync :-) */
> > + struct inode *inode = file->f_mapping->host;
> > + return sync_blockdev(inode->i_sb->s_bdev);
>
> So you push all dirty data into buffers immediately and don't have
> anything else to write back?
Data are written in vfs_fsync_range ... so fsync should write just
metadata. I write all metadata, HPFS is not performance-sensitive anyway,
so there is no need to differentiate metadata for a specific file.
Mikulas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-11 16:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-08 18:44 [PATCH 10/14] HPFS: Implement fsync for hpfs Mikulas Patocka
2011-05-10 8:03 ` Christoph Hellwig
2011-05-11 13:03 ` Mikulas Patocka
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).