Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2222682ybd; Thu, 27 Jun 2019 08:45:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyHtR5f6z2ukIGT05/JXP2enpLrnvfYKdqO6C625WPBHv3kxmhqJE3zc4Azk/VR9mjmzF6I X-Received: by 2002:a17:90a:2224:: with SMTP id c33mr6870150pje.22.1561650346285; Thu, 27 Jun 2019 08:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561650346; cv=none; d=google.com; s=arc-20160816; b=S4daVnE9VYPlk5gRTUAHKYyLM1aWmnDKZCJ6TwKpy3hp8bUgEql6p/zjNpiffUmz49 z8n8mPmxDKbNawaV5qtWjWYaYDS5G77Ju5kAVm4wRqWqxJFYtIDzoTxLhYyzFaVIgFYQ fj20CTkgffz0zEy6T27/sFFgspVscZb8mlw1xvtHFxRLCo4DQwOtvjBOVQwaRZe7soiP mujt57L/LwTRXnu6DuY25MHY+C21ix865SCvyz5I0L/GQ1gLS4CCgujhqXYyyTaStNHI ahwPU2ZohVIoAIDW66zGUX7lXXdvcRhOpn/URchBtSFZu7BcUgfJHmJXmVD6ci7638mr aLdg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date; bh=5TFePG9UurqJgryeKrryODtwIIEpVu7N7u57XR9moa0=; b=jPVBci/4nzDyHCegFnuMg1F0kvuEdpZmoUWm1/J6B1SvYDf+BbDidixz45darSGG/B zNK3XsKewk5RAHRWPIKx/aq2tzNomgJzG8M622UTGphWKJ+yNIw8z/6xGDu1Ky9qa1el eXLnov0cyUsBNjsW2vKAkAd2ko5Fl87sqzEIFpI9KEjA37iXrAUbibm5mHGBZebWaTpC NNH9ECkAtZxN2/g9HRMus8SwK9FaMpCoIhG/aNT6pcn5cbmQE3FVJS16iyVdZYBEox5i ocJjab4oJL2ER66e39KWJiUsiODtNMT5K29FaC22o6VHl/Skzm7MgXwpQ0Et5lIjv7qc wqZA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f5si2398108pgq.564.2019.06.27.08.45.30; Thu, 27 Jun 2019 08:45:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726578AbfF0Poe (ORCPT + 99 others); Thu, 27 Jun 2019 11:44:34 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51960 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726187AbfF0Poe (ORCPT ); Thu, 27 Jun 2019 11:44:34 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2C23F5F79B; Thu, 27 Jun 2019 15:44:34 +0000 (UTC) Received: from ovpn-112-33.rdu2.redhat.com (ovpn-112-33.rdu2.redhat.com [10.10.112.33]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4021660BE0; Thu, 27 Jun 2019 15:44:32 +0000 (UTC) Date: Thu, 27 Jun 2019 15:44:31 +0000 (UTC) From: Sage Weil X-X-Sender: sage@piezo.novalocal To: Jeff Layton cc: Luis Henriques , "Yan, Zheng" , Ilya Dryomov , ceph-devel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [RFC PATCH] ceph: initialize superblock s_time_gran to 1 In-Reply-To: <0459c2a46200194c14b7474f55071b12fbc3d594.camel@kernel.org> Message-ID: References: <20190627135122.12817-1-lhenriques@suse.com> <0459c2a46200194c14b7474f55071b12fbc3d594.camel@kernel.org> User-Agent: Alpine 2.11 (DEB 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Thu, 27 Jun 2019 15:44:34 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Jun 2019, Jeff Layton wrote: > On Thu, 2019-06-27 at 14:51 +0100, Luis Henriques wrote: > > Having granularity set to 1us results in having inode timestamps with a > > accurancy different from the fuse client (i.e. atime, ctime and mtime will > > always end with '000'). This patch normalizes this behaviour and sets the > > granularity to 1. > > > > Signed-off-by: Luis Henriques > > --- > > fs/ceph/super.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > Hi! > > > > As far as I could see there are no other side-effects of changing > > s_time_gran but I'm really not sure why it was initially set to 1000 in > > the first place so I may be missing something. > > > > diff --git a/fs/ceph/super.c b/fs/ceph/super.c > > index d57fa60dcd43..35dd75bc9cd0 100644 > > --- a/fs/ceph/super.c > > +++ b/fs/ceph/super.c > > @@ -980,7 +980,7 @@ static int ceph_set_super(struct super_block *s, void *data) > > s->s_d_op = &ceph_dentry_ops; > > s->s_export_op = &ceph_export_ops; > > > > - s->s_time_gran = 1000; /* 1000 ns == 1 us */ > > + s->s_time_gran = 1; > > > > ret = set_anon_super(s, NULL); /* what is that second arg for? */ > > if (ret != 0) > > > Looks like it was set that way since the client code was originally > merged. Was this an earlier limitation of ceph that is no longer > applicable? > > In any case, I see no need at all to keep this at 1000, so: As long as the encoded on-write time value is at ns resolution, I agree! No recollection of why I did this :( Reviewed-by: Sage Weil