Message ID | 1449267345-79400-1-git-send-email-jaegeuk@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Hi Jaegeuk, On 12/5/15 6:15 AM, Jaegeuk Kim wrote: > The mkfs.f2fs has an option to build a certain sized filesystem by giving > the number of sectors. > > So, this patch adds to use that. > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> > --- > common/rc | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/common/rc b/common/rc > index 4c2f42c..ef913b4 100644 > --- a/common/rc > +++ b/common/rc > @@ -739,6 +739,10 @@ _scratch_mkfs_sized() > $MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \ > `expr $fssize / 1024` > ;; > + f2fs) > + # mkfs.f2fs requires # of sectors as an input for the size > + $MKFS_F2FS_PROG $MKFS_OPTIONS $SCRATCH_DEV `expr $fssize / 512` In mkfs.f2fs, we will calculate fs size based on real sector size of block device and the input sectors, so if sector size of block device is not 512, our fs size calculated will be incorrect. How about fixing it for supporting different sector size? Thanks, > + ;; > *) > _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized" > ;; > -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Chao, On Sat, Dec 05, 2015 at 09:11:31PM +0800, Chao Yu wrote: > Hi Jaegeuk, > > On 12/5/15 6:15 AM, Jaegeuk Kim wrote: > > The mkfs.f2fs has an option to build a certain sized filesystem by giving > > the number of sectors. > > > > So, this patch adds to use that. > > > > Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> > > --- > > common/rc | 4 ++++ > > 1 file changed, 4 insertions(+) > > > > diff --git a/common/rc b/common/rc > > index 4c2f42c..ef913b4 100644 > > --- a/common/rc > > +++ b/common/rc > > @@ -739,6 +739,10 @@ _scratch_mkfs_sized() > > $MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \ > > `expr $fssize / 1024` > > ;; > > + f2fs) > > + # mkfs.f2fs requires # of sectors as an input for the size > > + $MKFS_F2FS_PROG $MKFS_OPTIONS $SCRATCH_DEV `expr $fssize / 512` > > In mkfs.f2fs, we will calculate fs size based on real sector size of block > device and the input sectors, so if sector size of block device is not 512, our > fs size calculated will be incorrect. > > How about fixing it for supporting different sector size? Sure, I'll resend v2. Thanks, > > Thanks, > > > + ;; > > *) > > _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized" > > ;; > > -- To unsubscribe from this list: send the line "unsubscribe fstests" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/common/rc b/common/rc index 4c2f42c..ef913b4 100644 --- a/common/rc +++ b/common/rc @@ -739,6 +739,10 @@ _scratch_mkfs_sized() $MKFS_REISER4_PROG $MKFS_OPTIONS -y -b $blocksize $SCRATCH_DEV \ `expr $fssize / 1024` ;; + f2fs) + # mkfs.f2fs requires # of sectors as an input for the size + $MKFS_F2FS_PROG $MKFS_OPTIONS $SCRATCH_DEV `expr $fssize / 512` + ;; *) _notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized" ;;
The mkfs.f2fs has an option to build a certain sized filesystem by giving the number of sectors. So, this patch adds to use that. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org> --- common/rc | 4 ++++ 1 file changed, 4 insertions(+)