mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Laurent Barbe <laurent@ksperis.com>
To: ceph-devel@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, Laurent Barbe <laurent@ksperis.com>
Subject: [PATCH] rbd: revalidate_disk upon rbd resize
Date: Wed, 10 Apr 2013 18:06:29 +0200	[thread overview]
Message-ID: <1365609989-14493-1-git-send-email-laurent@ksperis.com> (raw)

If rbd disk is open and rbd resize is done, new size is not visible by
filesystem.
Like is done in virtio-blk and dm driver, revalidate_disk() permits to
update the bd_inode size.

Signed-off-by: Laurent Barbe <laurent@ksperis.com>
---
 drivers/block/rbd.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c
index f556f8a..1963025 100644
--- a/drivers/block/rbd.c
+++ b/drivers/block/rbd.c
@@ -2293,6 +2293,7 @@ static void rbd_update_mapping_size(struct rbd_device *rbd_dev)
 	dout("setting size to %llu sectors", (unsigned long long) size);
 	rbd_dev->mapping.size = (u64) size;
 	set_capacity(rbd_dev->disk, size);
+	revalidate_disk(rbd_dev->disk);
 }
 
 /*
-- 
1.7.10.4


             reply	other threads:[~2013-04-10 16:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10 16:06 Laurent Barbe [this message]
2013-04-10 19:30 ` Alex Elder
2013-04-11  2:53   ` Alex Elder
     [not found]     ` <CADksbcpbhp8-Db2bqQc_fFwmT-iObYdjK+rXJF5DiZ9wu1sSQA@mail.gmail.com>
2013-04-11 13:27       ` Alex Elder
2013-04-11 13:59         ` Laurent Barbe

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=1365609989-14493-1-git-send-email-laurent@ksperis.com \
    --to=laurent@ksperis.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /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

all inboxes | Powered by JetHome®