+ ufs-fsync-implementation.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     ufs: fsync implementation

has been added to the -mm tree.  Its filename is

     ufs-fsync-implementation.patch

See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find
out what to do about this

------------------------------------------------------
Subject: ufs: fsync implementation
From: Evgeniy Dushistov <dushistov@xxxxxxx>


Presently ufs doesn't support "fsync", this make some applications unhappy,
for example vim.  This patch fixes this situation.

Signed-off-by: Evgeniy Dushistov <dushistov@xxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 fs/ufs/file.c |   21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff -puN fs/ufs/file.c~ufs-fsync-implementation fs/ufs/file.c
--- a/fs/ufs/file.c~ufs-fsync-implementation
+++ a/fs/ufs/file.c
@@ -25,6 +25,26 @@
 
 #include <linux/fs.h>
 #include <linux/ufs_fs.h>
+#include <linux/buffer_head.h>	/* for sync_mapping_buffers() */
+
+static int ufs_sync_file(struct file *file, struct dentry *dentry, int datasync)
+{
+	struct inode *inode = dentry->d_inode;
+	int err;
+	int ret;
+
+	ret = sync_mapping_buffers(inode->i_mapping);
+	if (!(inode->i_state & I_DIRTY))
+		return ret;
+	if (datasync && !(inode->i_state & I_DIRTY_DATASYNC))
+		return ret;
+
+	err = ufs_sync_inode(inode);
+	if (ret == 0)
+		ret = err;
+	return ret;
+}
+
 
 /*
  * We have mostly NULL's here: the current defaults are ok for
@@ -37,6 +57,7 @@ const struct file_operations ufs_file_op
 	.write		= generic_file_write,
 	.mmap		= generic_file_mmap,
 	.open           = generic_file_open,
+	.fsync		= ufs_sync_file,
 	.sendfile	= generic_file_sendfile,
 };
 
_

Patches currently in -mm which might be from dushistov@xxxxxxx are

git-jfs.patch
ufs-ufs_trunc_indirect-infinite-cycle.patch
ufs-right-block-allocation.patch
ufs-change-block-number-on-the-fly.patch
ufs-directory-and-page-cache-install-aops.patch
ufs-directory-and-page-cache-from-blocks-to-pages.patch
ufs-wrong-type-cast.patch
ufs-not-usual-amounts-of-fragments-per-block.patch
ufs-unmark-config_ufs_fs_write-as-broken-mm-tree.patch
ufs-easy-debug.patch
ufs-little-directory-lookup-optimization.patch
ufs-i_blocks-wrong-count.patch
ufs-unlock_super-without-lock.patch
ufs-zero-metadata.patch
ufs-printk-warning-fixes.patch
ufs-missed-brelse-and-wrong-baseblk.patch
ufs-one-way-to-access-super-block.patch
ufs-fsync-implementation.patch
ufs-make-fsck-f-happy.patch
ufs-ubh_ll_rw_block-cleanup.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux