All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/1] nilfs2: add missing blkdev_issue_flush() to nilfs_sync_fs()
@ 2014-08-31 15:47 Andreas Rohner
       [not found] ` <1409500033-30791-1-git-send-email-andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
  0 siblings, 1 reply; 10+ messages in thread
From: Andreas Rohner @ 2014-08-31 15:47 UTC (permalink / raw)
  To: linux-nilfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Andreas Rohner

Hi,

I have looked a bit more into the semantics of the various flags
concerning block device caching behaviour. According to
"Documentation/block/writeback_cache_control.txt" a call to
blkdev_issue_flush() is equivalent to an empty bio with the
REQ_FLUSH flag set. So there is no need to call blkdev_issue_flush()
after a call to nilfs_commit_super(). But if there is no need to write
the super block an additional call to blkdev_issue_flush() is necessary.

To avoid an overhead I introduced the THE_NILFS_FLUSHED flag, which is
cleared whenever new logs are written and set whenever the block device
is flushed. If the super block was written during segment construction
or in nilfs_sync_fs(), then blkdev_issue_flush() is not called.

I am pretty sure, that there are no race conditions, but maybe someone
should check that possibility before merging this.

br,
Andreas Rohner

v1->v2
 * Add new flag THE_NILFS_FLUSHED

Andreas Rohner (1):
  nilfs2: add missing blkdev_issue_flush() to nilfs_sync_fs()

 fs/nilfs2/file.c      | 3 ++-
 fs/nilfs2/ioctl.c     | 3 ++-
 fs/nilfs2/segment.c   | 2 ++
 fs/nilfs2/super.c     | 8 ++++++++
 fs/nilfs2/the_nilfs.h | 6 ++++++
 5 files changed, 20 insertions(+), 2 deletions(-)

-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-09-09 18:55 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-31 15:47 [PATCH v2 0/1] nilfs2: add missing blkdev_issue_flush() to nilfs_sync_fs() Andreas Rohner
     [not found] ` <1409500033-30791-1-git-send-email-andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-08-31 15:47   ` [PATCH v2 1/1] " Andreas Rohner
     [not found]     ` <1409500033-30791-2-git-send-email-andreas.rohner-hi6Y0CQ0nG0@public.gmane.org>
2014-09-01 17:59       ` Ryusuke Konishi
     [not found]         ` <20140902.025939.1812841141168890644.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-09-01 18:43           ` Andreas Rohner
     [not found]             ` <5404BE5C.9080302-hi6Y0CQ0nG0@public.gmane.org>
2014-09-01 19:18               ` Andreas Rohner
     [not found]                 ` <5404C686.4070800-hi6Y0CQ0nG0@public.gmane.org>
2014-09-03  0:35                   ` Ryusuke Konishi
     [not found]                     ` <20140903.093525.810247375407684014.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-09-03 12:32                       ` Andreas Rohner
     [not found]                         ` <54070A56.9050807-hi6Y0CQ0nG0@public.gmane.org>
2014-09-07  5:12                           ` Ryusuke Konishi
     [not found]                             ` <20140907.141232.2124135104047617747.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org>
2014-09-08 19:03                               ` Andreas Rohner
     [not found]                                 ` <540DFD66.1090904-hi6Y0CQ0nG0@public.gmane.org>
2014-09-09 18:55                                   ` Ryusuke Konishi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.