login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
September
»
4
Re: [PATCH 0/6] detect online disk resize
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jens Axboe
Subject:
Re: [PATCH 0/6] detect online disk resize
Date: Thursday, September 4, 2008 - 12:26 am
On Fri, Aug 29 2008, Andrew Patterson wrote:
quoted text
> This is version 2 of a patch series I submitted back in May 2008. This > version now checks for device size changes in the rescan_partitions() > routine. Which in turn is called when a device is opened and in the > BLKRRPART ioctl. > > I am resubmitting this patch series as I got little response the > previous time. Al Viro has told me offline that he would look at it this > time. > > This patch series handles online disk resizes that are currently not > completely recognized by the kernel using the existing revalidate_disk > routines. An online resize can occur when growing or shrinking a > Fibre Channel LUN or perhaps by adding a disk to an existing RAID > volume. > > The kernel currently recognizes a device size change when the > lower-level revalidate_disk routines are called; however, the block > layer does not use the new size while it has any current openers on > the device. So, for example, if LVM has an volume open on the device, > you will generally not see the size change until after a reboot. We > fix this problem by creating a wrapper to be used with lower-level > revalidate_disk routines. This wrapper first calls the lower-level > driver's revalidate_disk routine. It then compares the gendisk > capacity to the block devices inode size. If there is a difference, we > adjust the block device's size. If the size has changed, we then flush > the disk for safety. The size is also checked in rescan_partitions > which is called when the device is opened or when the BLKRRPART ioctl > is called. > > There are several ways to "kick off" a device size change: > > 1. For SCSI devices do: > > # echo 1 > /sys/class/scsi_device/<device>/device/rescan > > or > > # blockdev --rereadpt <device file> > > 2. Other devices (not device mapper) > > # blockdev --rereadpt <device file> > > I have tested this patch on SCSI and SmartArray (cciss) > devices. Device mapper still does not recognize device size changes > until the device is restarted. > > Jeff Moyer and Andy Ryan have done some light testing on the previous > version of this series. > > This patch set has been tested with scsi-misc-2.6. It also applies to > linux-next with some minor, obvious changes.
This version looks sane to me. Care to resend against for-2.6.28 of the block repo? -- Jens Axboe --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/6] detect online disk resize
, Andrew Patterson
, (Fri Aug 29, 4:12 pm)
[PATCH 1/6] Wrapper for lower-level revalidate_disk routines.
, Andrew Patterson
, (Fri Aug 29, 4:13 pm)
[PATCH 2/6] Adjust block device size after an online resiz ...
, Andrew Patterson
, (Fri Aug 29, 4:13 pm)
[PATCH 3/6] Check for device resize when rescanning partitions
, Andrew Patterson
, (Fri Aug 29, 4:13 pm)
[PATCH 4/6] SCSI sd driver calls revalidate_disk wrapper.
, Andrew Patterson
, (Fri Aug 29, 4:13 pm)
[PATCH 5/6] Added flush_disk to factor out common buffer c ...
, Andrew Patterson
, (Fri Aug 29, 4:13 pm)
[PATCH 6/6] Call flush_disk() after detecting an online re ...
, Andrew Patterson
, (Fri Aug 29, 4:13 pm)
Re: [PATCH 1/6] Wrapper for lower-level revalidate_disk ro ...
, Jeff Moyer
, (Wed Sep 3, 11:16 am)
Re: [PATCH 2/6] Adjust block device size after an online r ...
, Jeff Moyer
, (Wed Sep 3, 11:17 am)
Re: [PATCH 3/6] Check for device resize when rescanning pa ...
, Jeff Moyer
, (Wed Sep 3, 11:17 am)
Re: [PATCH 4/6] SCSI sd driver calls revalidate_disk wrapper.
, Jeff Moyer
, (Wed Sep 3, 11:17 am)
Re: [PATCH 5/6] Added flush_disk to factor out common buff ...
, Jeff Moyer
, (Wed Sep 3, 11:19 am)
Re: [PATCH 6/6] Call flush_disk() after detecting an onlin ...
, Jeff Moyer
, (Wed Sep 3, 11:20 am)
Re: [PATCH 5/6] Added flush_disk to factor out common buff ...
, Andrew Patterson
, (Wed Sep 3, 9:16 pm)
Re: [PATCH 0/6] detect online disk resize
, Jens Axboe
, (Thu Sep 4, 12:26 am)
Re: [PATCH 5/6] Added flush_disk to factor out common buff ...
, Jeff Moyer
, (Thu Sep 4, 6:13 am)
Re: [PATCH 0/6] detect online disk resize
, Andrew Patterson
, (Thu Sep 4, 7:25 am)
Re: [PATCH 0/6] detect online disk resize
, Jeff Moyer
, (Mon Sep 8, 11:01 am)
Re: [PATCH 0/6] detect online disk resize
, Pasi
, (Tue Sep 9, 12:41 am)
Re: [PATCH 0/6] detect online disk resize
, Vladislav Bolkhovitin
, (Wed Sep 24, 8:23 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Michael Trimarchi
Re: [PATCH] VFS: make file->f_pos access atomic on 32bit arch
Miklos Szeredi
[patch 14/15] vfs: more path_permission() conversions
Serge E. Hallyn
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
Bernd Schmidt
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Takashi Iwai
[PATCH 2/2] input: Add LED support to Synaptics device
git
:
Junio C Hamano
Re: mingw, windows, crlf/lf, and git
Eyvind Bernhardsen
Re: Where has "git ls-remote" reference pattern matching gone?
Shawn O. Pearce
Re: Switching from CVS to GIT
Todd Zullinger
Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters
Santi Béjar
Re: How to use git-fmt-merge-msg?
linux-netdev
:
Ramkrishna Vepa
[net-2.6 PATCH 1/10] Neterion: New driver: Driver help file
Mark Anthony
invitation / inquiry
Ingo Molnar
Re: [PATCH 08/16] dma-debug: add core checking functions
David Miller
Re: [PATCH 1/3] f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Sascha Hauer
[PATCH 03/12] fec: do not typedef struct types
git-commits-head
:
Linux Kernel Mailing List
amba: struct device - replace bus_id with dev_name(), dev_set_name()
Linux Kernel Mailing List
MIPS: Yosemite: Convert SMP startup lock to arch spinlock.
Linux Kernel Mailing List
ARM: S5PC100: IRQ and timer
Linux Kernel Mailing List
davinci: edma: clear interrupt status for interrupt enabled channels only
Linux Kernel Mailing List
x86, mm, kprobes: fault.c, simplify notify_page_fault()
openbsd-misc
:
Daniel A. Ramaley
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Matthias Kilian
Re: can't get vesa @ 1280x800 or nv
Tobias Ulmer
Re: Problem after upgrade 4.5 to 4.6: ERR M
Philip Guenther
Re: SIGCHLD and libpthread.so
J.C. Roberts
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Colocation donated by:
Syndicate