Hi Jaegeuk,

On Wed, Apr 17, 2019 at 5:35 AM Jaegeuk Kim <jaeg...@kernel.org> wrote:
> > -             if (c.kd < 0) {
> > -                     MSG(0, "\tInfo: No support kernel version!\n");
> > -                     c.kd = -2;
>
> If there are multiple devices, we don't need to get the version redundantly.

Oh, didn't think of that case.

Can we just read the kernel version and store to memory from
initialization of the program?
I see that the code for getting the kernel version is already
duplicated in 2 different files: fsck/mount.c and mkfs/f2fs_format.c

/* get kernel version */
if (c.kd >= 0) {
        dev_read_version(c.version, 0, VERSION_LEN);
        get_kernel_version(c.version);
} else {
        get_kernel_uname_version(c.version);
}

Thanks.


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Reply via email to