From patchwork Sat Sep 22 20:19:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Sorenson X-Patchwork-Id: 10611555 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D9EA15A6 for ; Sat, 22 Sep 2018 20:20:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D997B2AE80 for ; Sat, 22 Sep 2018 20:20:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CBDD82AEC4; Sat, 22 Sep 2018 20:20:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B81F62AE80 for ; Sat, 22 Sep 2018 20:20:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727474AbeIWCOt (ORCPT ); Sat, 22 Sep 2018 22:14:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38362 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726226AbeIWCOt (ORCPT ); Sat, 22 Sep 2018 22:14:49 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5995830820D5; Sat, 22 Sep 2018 20:20:01 +0000 (UTC) Received: from hut.sorensonfamily.com.com (ovpn-116-190.phx2.redhat.com [10.3.116.190]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D9B1187DE; Sat, 22 Sep 2018 20:20:00 +0000 (UTC) From: Frank Sorenson To: linux-fsdevel@vger.kernel.org Cc: hirofumi@mail.parknet.co.jp Subject: [PATCH 1/4] fat: set the s_time_gran for msdos or vfat mounts Date: Sat, 22 Sep 2018 15:19:56 -0500 Message-Id: <20180922201959.10477-2-sorenson@redhat.com> In-Reply-To: <20180922201959.10477-1-sorenson@redhat.com> References: <20180922201959.10477-1-sorenson@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.47]); Sat, 22 Sep 2018 20:20:01 +0000 (UTC) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For vfat, ctime granularity is 10ms; set the super_block's s_time_gran to 10ms for vfat and 1 second for msdos mounts. Signed-off-by: Frank Sorenson --- fs/fat/inode.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fat/inode.c b/fs/fat/inode.c index d6b81e31f9f5..36071866a324 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c @@ -1626,6 +1626,7 @@ int fat_fill_super(struct super_block *sb, void *data, int silent, int isvfat, sb->s_magic = MSDOS_SUPER_MAGIC; sb->s_op = &fat_sops; sb->s_export_op = &fat_export_ops; + sb->s_time_gran = isvfat ? 10000000 : 1000000000; mutex_init(&sbi->nfs_build_inode_lock); ratelimit_state_init(&sbi->ratelimit, DEFAULT_RATELIMIT_INTERVAL, DEFAULT_RATELIMIT_BURST);