login
Header Space

 
 

Re: bdev size not updated correctly after underlying device is resized

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Andrew Morton <akpm@...>
Cc: <linux-kernel@...>, <viro@...>, <dm-devel@...>, <axboe@...>, <andmike@...>
Date: Tuesday, April 15, 2008 - 7:21 pm

On Tue, 2008-04-15 at 16:03 -0700, Andrew Morton wrote:

I have been looking through code where this might be a problem.  The
sort of things I was worried about is where something might try and do a
calculation based on the i_size and write/read data from there after it
has been resized, possibly corrupting data.  The COW code in dm seems to
come the closest, but then if you are resizing the device that has
snapshots on it, you might be getting what you deserve.


Agreed.


Yes, this common with LVM at least.  Whether it is a good idea to do
this with a mounted file-system on it is another matter.


Except that this is not only done with file-systems.  In my case I am
just trying to extend an LVM logical volume after a resize but cannot
because it is open (activated). In practice, however, it is probably
only useful to do this with an online file-system.  Otherwise you could
just close all openers and the resize will work fine.


-- 
Andrew Patterson

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: bdev size not updated correctly after underlying device ..., Andrew Patterson, (Tue Apr 15, 7:21 pm)
Re: bdev size not updated correctly after underlying device ..., Andrew Patterson, (Thu Apr 17, 11:49 am)
speck-geostationary