Bug 151713 - [patch] Bug in growfs(8) with respect to 32-bit overflow
Summary: [patch] Bug in growfs(8) with respect to 32-bit overflow
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: unspecified
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-25 12:20 UTC by dean
Modified: 2019-04-05 08:04 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dean 2010-10-25 12:20:09 UTC
Growfs has a 32bit integer internall, where it should have a 64bit. This has the effect that filesystems over a certain size cant be enlarged.

Fix: 

Hi Growfs team

I believe i have uncovered a bug in growfs related to 32bit integers.

My original enquirey to freebsd-fs@freebsd is archived at ...
http://marc.info/?l=freebsd-fs&m=128533133814268

You can see that i have enlarged a disk where i had previous formatted it
without slices/partitions. I then wanted to grow the filesystem to match.

I dont believer there is a problem with the slices/noslices side of
things, but i believe there is an integer looping inside growfs which is
causing it to refuse to enlarge.

I poked around in the source code and i believe that the p_size variable
should be 64bit.

Some googling shows support for this theory...

here is another person reporting the same problem as myself

first post -
http://fixunix.com/freebsd/293354-growfs-filesystem-size-limits.html
discussion about p_size -
http://fixunix.com/freebsd/293353-re-growfs-filesystem-size-limits.html
further discussion -
http://fixunix.com/freebsd/293364-re-growfs-filesystem-size-limits.html


here is a much more recent thread with the same sort of problem
http://forums.freebsd.org/showthread.php?t=15252

which includes a link to patch for an older version of growfs
http://masq.tychl.net/growfs.patch

Which expands upon the changes outlined in the 'fixunix.com' discussion.

I am hoping that you can make appropriate changes in growfs and release
them in to freebsd.

Thank you for your good work.

Dean
How-To-Repeat: Try to enlarge a filesystem whos size is beyond 2^32
Comment 1 Alexander Best freebsd_committer 2010-11-13 09:55:47 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-fs

Assign to freebsd-fs@, since they should have an opinion regarding this issue.
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:58:24 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Andriy Voskoboinyk freebsd_committer 2019-04-05 08:04:43 UTC
The 'p_size' variable does not exist since base r234846; is it still an issue?