linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mike Snitzer <snitzer@redhat.com>
To: axboe@kernel.dk, linux-kernel@vger.kernel.org,
	linux-fsdevel@vger.kernel.org
Cc: tj@kernel.org, hch@infradead.org, jmoyer@redhat.com,
	vgoyal@redhat.com, dm-devel@redhat.com
Subject: [RFC PATCH] block: all callers should check blkdev_issue_flush's return
Date: Tue, 26 Jun 2012 11:27:25 -0400	[thread overview]
Message-ID: <1340724445-3314-1-git-send-email-snitzer@redhat.com> (raw)

It is concerning that a FLUSH may fail but the blkdev_issue_flush
callers assume it will always succeed.

Each blkdev_issue_flush caller should come to terms with the reality
that a FLUSH may fail -- the file_operations' .fsync methods in
particular.  nilfs2 is the only filesystem that checks
blkdev_issue_flush's return.

Signed-off-by: Mike Snitzer <snitzer@redhat.com>
---
 include/linux/blkdev.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index ba43f40..76d6e48 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -968,7 +968,7 @@ static inline struct request *blk_map_queue_find_tag(struct blk_queue_tag *bqt,
 
 #define BLKDEV_DISCARD_SECURE  0x01    /* secure discard */
 
-extern int blkdev_issue_flush(struct block_device *, gfp_t, sector_t *);
+extern int __must_check blkdev_issue_flush(struct block_device *, gfp_t, sector_t *);
 extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
 		sector_t nr_sects, gfp_t gfp_mask, unsigned long flags);
 extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
-- 
1.7.1

             reply	other threads:[~2012-06-26 15:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-26 15:27 Mike Snitzer [this message]
2012-06-26 15:33 ` [RFC PATCH] block: all callers should check blkdev_issue_flush's return Jeff Moyer
2012-06-26 15:51 ` Christoph Hellwig
2012-06-26 15:57   ` Mike Snitzer
2012-07-01  7:28     ` Joel Becker
2012-07-02 14:35       ` Mike Snitzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1340724445-3314-1-git-send-email-snitzer@redhat.com \
    --to=snitzer@redhat.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=hch@infradead.org \
    --cc=jmoyer@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@kernel.org \
    --cc=vgoyal@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).