Re: [PATCH v8 02/13] exfat: add super block operations
From: Arnd Bergmann
Date: Wed Jan 08 2020 - 14:56:06 EST
On Fri, Dec 20, 2019 at 7:28 AM Namjae Jeon <namjae.jeon@xxxxxxxxxxx> wrote:
> +static int exfat_fill_super(struct super_block *sb, struct fs_context *fc)
> +{
> + struct exfat_sb_info *sbi = sb->s_fs_info;
> + struct exfat_mount_options *opts = &sbi->options;
> + struct inode *root_inode;
> + int err;
> +
> + if (opts->allow_utime == (unsigned short)-1)
> + opts->allow_utime = ~opts->fs_dmask & 0022;
> +
> + if (opts->utf8 && strcmp(opts->iocharset, exfat_iocharset_with_utf8)) {
> + exfat_msg(sb, KERN_WARNING,
> + "utf8 enabled, \"iocharset=%s\" is recommended",
> + exfat_iocharset_with_utf8);
> + }
> +
> + if (opts->discard) {
> + struct request_queue *q = bdev_get_queue(sb->s_bdev);
> +
> + if (!blk_queue_discard(q))
> + exfat_msg(sb, KERN_WARNING,
> + "mounting with \"discard\" option, but the device does not support discard");
> + opts->discard = 0;
> + }
> +
> + sb->s_flags |= SB_NODIRATIME;
> + sb->s_magic = EXFAT_SUPER_MAGIC;
> + sb->s_op = &exfat_sops;
I don't see you set up s_time_gran, s_time_min and s_time_max
anywhere. Please fill those to get the correct behavior. That also lets
you drop the manual truncation of the values.
Arnd