[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMTyv-G6NKai1DRt6oMeeYZfekxz0mmL9p4ogZP52c7kxEYR8Q@mail.gmail.com>
Date: Thu, 30 Aug 2012 11:24:31 +0530
From: raphel johnson <iraphel78@...il.com>
To: Andreas Dilger <adilger@...ger.ca>
Cc: linux-ext4@...r.kernel.org
Subject: Re: why online shrink is not supported with EXT4_IOC_RESIZE_FS?
Hi Andreas,
Thanks a lot for your reply.
Regards,
Raphel
On Mon, Aug 27, 2012 at 11:21 PM, Andreas Dilger <adilger@...ger.ca> wrote:
> On 2012-08-27, at 7:30 AM, raphel johnson wrote:
>> I was referring EXT4_IOC_RESIZE_FS ioctl implementation in linux
>> kernel ver 3.3.8.
>>
>> It is given in the code that online shrinking not supported.
>>
>> if (n_blocks_count < o_blocks_count) {
>> /* On-line shrinking not supported */
>> ext4_warning(sb, "can't shrink FS - resize aborted");
>> return -EINVAL;
>> }
>>
>> I am new to ext4 file system. Could you please tell online shrinking
>> issues in ext4.
>>
>> Thanks in adavance.
>
> There are several reasons for this:
> - if blocks are in use beyond the new end of the filesystem, potentially
> all inodes in the filesystem need to be scanned to find the owner
> - this also causes consistency issues with the page cache, since moving
> in-use disk blocks is tricky, and it isn't always possible to remove
> them from memory
> - if in-use inodes are beyond the end of the new filesystem, potentially
> all of the directories in the filesystem need to be scanned to find the
> parent directory
> - moving inodes in ext4 will also cause the inode number to change, which
> would break NFS and potentially other programs
>
> In the end, rarely do users need to shrink a filesystem while mounted, so
> the effort and complexity of doing this isn't worthwhile.
>
> Cheers, Andreas
>
>
>
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists