Btrfs-progs: btrfs file system size should be bigger then 256m
PATCH 1/1 Btrfs-progs: btrfs file system size should be bigger then 256m
According to btrfs_prepare_device, btrfs file sysstem size should be bigger then 256m.
If mkfs.btrfs specifies the file system size samaller then that, mkfs.btrfs should report error.
--- mkfs.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
mkfs.c +4 -0
@@ -377,6 +377,10 @@ int main(int ac, char **av)break ;case 'b' : block_count =parse_size (optarg); +if (block_count <256 *1024 *1024 ) { +fprintf (stderr,"File system size is too small\n" ); +exit (1 ); + } zero_end =0 ;break ;default :
Signature · 1 line
1.6.0.6
This has been bothering me for some time. Why does btrfs need to have a disk greater then 256M? I could see a much smaller limit, say 16M but why so much? The file system itself does not need that much space for its own use.
Thanks,
Lee
Quoted 27 lines · Shen Feng
According to
btrfs_prepare_device, btrfs file sysstem size should be bigger then 256m.If mkfs.btrfs specifies the file system size samaller then that, mkfs.btrfs should report error.
Signed-off-by Shen Feng <[email protected]>--- mkfs.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)mkfs.c +4
-0@@ -377,6 +377,10 @@ int main(int ac, char **av)break ;case 'b' : block_count =parse_size (optarg); +if (block_count <256 *1024 *1024 ) { +fprintf (stderr,"File system size is too small\n" ); +exit (1 ); + } zero_end =0 ;break ;default :
My test shows that at least 100M is needed for a btrfs partition.
Quoted 44 lines · Lee Trager
This has been bothering me for some time. Why does btrfs need to have a disk greater then 256M? I could see a much smaller limit, say 16M but why so much? The file system itself does not need that much space for its own use.
Thanks,
Lee
Quoted 27 lines · Shen Feng
According to
btrfs_prepare_device, btrfs file sysstem size should be bigger then 256m.If mkfs.btrfs specifies the file system size samaller then that, mkfs.btrfs should report error.
Signed-off-by Shen Feng <[email protected]>--- mkfs.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)mkfs.c +4
-0@@ -377,6 +377,10 @@ int main(int ac, char **av)break ;case 'b' : block_count =parse_size (optarg); +if (block_count <256 *1024 *1024 ) { +fprintf (stderr,"File system size is too small\n" ); +exit (1 ); + } zero_end =0 ;break ;default :Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 13 lines
Best Regards, -------------------------------------------------- Shen Feng Development Dept.I Nanjing Fujitsu Nanda Software Tech. Co., Ltd.(FNST) 8/F., Civil Defense Building, No.189 Guangzhou Road, Nanjing, 210029, China PHONE: +86-25-86630566-950 COINS: 79955-950 FAX: +86-25-83317685 MAIL: [email protected] ------------------------------------------------- This communication is for use by the intended recipient(s) only and may contain information that is privileged, confidential and exempt from disclosure under applicable law. If you are not an intended recipient of this communication, you are hereby notified that any dissemination, distribution or copying hereof is strictly prohibited. If you have received this communication in error, please notify me by reply e-mail, permanently delete this communication from your system, and destroy any hard copies you may have printed.
mkfs.c int main(int ac, char **av) · line 383
Quoted 5 lines
mkfs.c +4
-0+if (block_count <256 *1024 *1024 ) { +fprintf (stderr,"File system size is too small\n" ); +exit (1 ); + }
And please, if you could, include both the size that is too small and the size that is required in the message.
- z
Quoted 8 lines · Zach Brown
Review
Quoted 4 lines
(quoted diff) +4
-0+ if (block_count < 256*1024*1024) { + fprintf(stderr, "File system size is too small\n"); + exit(1); + }And please, if you could, include both the size that is too small and the size that is required in the message.
Thanks. I updated the patch.
--- mkfs.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-)
mkfs.c +7 -0
@@ -377,6 +377,13 @@ int main(int ac, char **av)break ;case 'b' : block_count =parse_size (optarg); +if (block_count <256 *1024 *1024 ) { +fprintf (stderr,"File system size " +"%llu bytes is too small, " +"256M is required at least\n" , + block_count); +exit (1 ); + } zero_end =0 ;break ;default :