From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kara Subject: [PATCH 0/17] Make O_SYNC handling use standard syncing path (Version 2) Date: Fri, 21 Aug 2009 19:23:50 +0200 Message-ID: <1250875447-15622-1-git-send-email-jack@suse.cz> Cc: hch@lst.de, linux-fsdevel@vger.kernel.org To: LKML Return-path: Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi, first, sorry for a few patches sent before this one - I forgot to give --compose to git send-email and there was a bug in the third patch. This is the second version of my patch set improving O_SYNC implementation. The changes against previous version are small. Most notably generic_file_aio_write() now triggers fsync() even when it returns EIOCBQUEUED so that we behave the same way as generic_file_direct_write() did. I've added patch renaming generic_file_aio_write_nolock() to device_aio_write() (since it's used by fs/block_dev.c and drivers/char/raw.c). And finally I've optimized XFS syncing as Christoph has suggested. Any comments welcome and BTW I'd be happy if affected fs maintainers had a look at those patches so that I can add their ack. Honza --- Here's some rationale for the patch set: The patch set unifines O_SYNC handling with standard fsync() path. After this, we have just one place forcing a single file to disk so filesystems like ext3 / ext4 don't have to force a transaction commit in ext?_file_write for O_SYNC files / IS_SYNC inodes. The code is also cleaner this way (actually about 150 lines shorter), we don't sync the inode several times as it happened previously etc.