Re: [PATCH] Btrfs-progs: btrfs file system size should be bigger then 256m

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

 



on 01/01/2009 01:49 AM, Zach Brown wrote:
>> +				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.

Signed-off-by: Shen Feng <shen@xxxxxxxxxxxxxx>
---
 mkfs.c |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/mkfs.c b/mkfs.c
index be93aaa..cb21db6 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -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:
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux