tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: resize_ffs improvements



On Dec,Tuesday 28 2010, at 3:34 PM, Christopher Berardi wrote:

> On Sat, Dec 25, 2010 at 03:53:01AM +0100, Adam Hamsik wrote:
>> 
>> On Dec,Friday 24 2010, at 5:32 PM, Christopher Berardi wrote:
>> 
>>>> hi,
>>>> 
>>>> I have done some small improvements to resize_ffs. With [1] patch it ask 
>>>> for 
>>>> confirmation if user has run fsck on filesystem (requested by agc@) and I 
>>>> have 
>>>> changed default behaviour of tool to grow filesystem to device size by 
>>>> default,
>>>> shrinking is still possible with -s parameter. I would like to commit this 
>>>> patch and add resize_ffs to release build to have at least ffsv1 
>>>> grow/shrink 
>>>> working for users.
>>>> 
>>>> [1] www.netbsd.org/~haad/resize_ffs.diff
>>>> 
>>>> Regards
>>>> 
>>>> Adam.
>>> 
>>> I've done some more work on this, too. I attempted to recycle newfs(8) 
>>> code, though I wasn't entirely successful in the integration. I did, 
>>> however, make important improvements in the realm of user usability. For 
>>> example, I add options for entering the new size in different units, such 
>>> as KB, MB, GB, etc. as well as a percentage of the current filesystem size 
>>> (such as 150% of current file system size). 
>>> 
>>> Let me know if you'd be interested in seeing my code.
>> 
>> Yeah I'm interested and if you can show it to me it would be good. 
>> 
>> Regards
>> 
>> Adam.
>> 
>> 
> 
> I've attached a copy of the file. The code that deals with the usuability 
> features is found in lines 29-37; 98-158; 195-209; 662-754.

I looked at your code and fixed one obvious problem. DIOCGDINFO is not enough 
these days to get device size because with LVM and ZFS in tree there can be 
devices which doesn't support it.


Attachment: resize_ffs.c
Description: Binary data

Regards

Adam.



Home | Main Index | Thread Index | Old Index