Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp3081529ybd; Fri, 28 Jun 2019 02:31:20 -0700 (PDT) X-Google-Smtp-Source: APXvYqxVL8PtYYx9ksD99tELmv2A//Kgh/qfOPsdiMUBMmvO4IOO08wZpNO2QP4KulV6s+r0Wtz2 X-Received: by 2002:a63:8f55:: with SMTP id r21mr6003527pgn.318.1561714279748; Fri, 28 Jun 2019 02:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561714279; cv=none; d=google.com; s=arc-20160816; b=v/1PHgxW8RdNNb1nmDIytLPqQlOiVoC8Nm7rcS33+OtjPpHn+3PPp/O3zVvEhjdpTr M+I6QzpLTgymfNA238Sn3VjOgj60PIvMwifBMYtbSoillJDkphaFTI4oCy8LrPwJdNCx F3VA+cYUcphtMg+7PVhTUsimFH+2Usebm2P5lZLJMF/BbB9JvftEvOsTI731nBP5dWlV Lbcaed9Feg+jbC+kyOPUmOk6qfqpz80F12V0KOVCVU/SGFk4u2X6Pawlf3rkfWI3gRYS gMi9la1Ya0TS9LjcZ4bw7V4iegovC7jIbH3j2+KvwoFHxZbh3mrZZzg5l+UJsW1RokNU yfLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=/2eFXy/QkDjWERJfSRmv6spSFYrMBwSGX36JXTylFyI=; b=Ptdj+yMhwXNM+bV2X5bGeGtccAlhu5xTw/h6M65IfgX9tyLAnXZlddXs9lWeJTREoo SnTHExkHxVYqI03om73hOzj05DfC7IyWaZL2Bh3wSNp9sKHxp2E+yyV1uQNLzhccSw1k +D2z/rbwEAF0lq/yv44rIROTow5YbcV8IYWBpRgO5tFX93YDilylSm17kcEaBI2cWMC0 caCNSme9KAIKMSMQqahYpqgFLZKZCH1qk9/pk5sdDBbcv2fSPOIgrNZrry3dK7vzbnoY ZPAqyohzM1h18I2oPyWqwHs9mdPAuarElAcFDPcpGBNOIIEfu/PYVO0IRyj2PeXZJmLC OOzg== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s19si1697340pgs.124.2019.06.28.02.31.03; Fri, 28 Jun 2019 02:31:19 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726604AbfF1Jau (ORCPT + 99 others); Fri, 28 Jun 2019 05:30:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:56564 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726385AbfF1Jau (ORCPT ); Fri, 28 Jun 2019 05:30:50 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5C1C8AB5F; Fri, 28 Jun 2019 09:30:49 +0000 (UTC) From: Luis Henriques To: Jeff Layton Cc: Sage Weil , "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: (Jeff Layton's message of "Thu, 27 Jun 2019 12:10:25 -0400") References: <20190627135122.12817-1-lhenriques@suse.com> <0459c2a46200194c14b7474f55071b12fbc3d594.camel@kernel.org> Date: Fri, 28 Jun 2019 10:30:48 +0100 Message-ID: <87a7e2dpkn.fsf@suse.com> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jeff Layton writes: > On Thu, 2019-06-27 at 15:44 +0000, Sage Weil wrote: >> 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 > > Good enough for me. I went ahead and merged this into the testing > branch. Assuming nothing breaks, this should make v5.3. Awesome, thanks. AFAICS it shouldn't break anything, specially because the fuse client seems to be using ns resolution too. But yeah unexpected side-effects show up in unexpected ways :-) Cheers, -- Luis