Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753253AbbEHOnN (ORCPT ); Fri, 8 May 2015 10:43:13 -0400 Received: from mail-ie0-f172.google.com ([209.85.223.172]:34798 "EHLO mail-ie0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753143AbbEHOnK (ORCPT ); Fri, 8 May 2015 10:43:10 -0400 Message-ID: <554CCB75.2040108@gmail.com> Date: Fri, 08 May 2015 10:43:01 -0400 From: Austin S Hemmelgarn User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Sage Weil , Zach Brown CC: Dave Chinner , Alexander Viro , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org Subject: Re: [PATCH RFC] vfs: add a O_NOMTIME flag References: <1430949612-21356-1-git-send-email-zab@redhat.com> <20150507002617.GJ4327@dastard> <20150507172053.GA659@lenny.home.zabbo.net> In-Reply-To: x-hashcash: 1:21:150508:sage@newdream.net::efc07ff957145f236087bf82eb3d67c5:a002e394467e09c9 x-hashcash: 1:21:150508:zab@redhat.com::880d93bdc621b8d5458d2fb64635a25d:2b45366f38377af3 x-hashcash: 1:21:150508:david@fromorbit.com::38717f2f2a242c6ba5aff590b0ded33:5d2e99094576e78e x-hashcash: 1:21:150508:viro@zeniv.linux.org.uk::72e3c240d85fa1f6c8000cb3454e6b4:c3f359a79656fb92 x-hashcash: 1:21:150508:linux-fsdevel@vger.kernel.org::8b66b7826d77a2cad8146c7131be0cc:7457f6c4a86ef2a x-hashcash: 1:21:150508:linux-kernel@vger.kernel.org::110b3401891e7435bfac2ee9dc66e3d7:36821cf34cc30f0 x-hashcash: 1:21:150508:linux-api@vger.kernel.org::8ff4c9c290b5add3430b30b3aad4f028:83a10e4c037de55e x-stampprotocols: hashcash:1:17;mbound:0:10:3000:5000 Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha1; boundary="------------ms080309030200030901010807" X-Antivirus: avast! (VPS 150508-0, 2015-05-08), Outbound message X-Antivirus-Status: Clean Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 7754 Lines: 147 This is a cryptographically signed message in MIME format. --------------ms080309030200030901010807 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable On 2015-05-07 21:01, Sage Weil wrote: > On Thu, 7 May 2015, Zach Brown wrote: >> On Thu, May 07, 2015 at 10:26:17AM +1000, Dave Chinner wrote: >>> On Wed, May 06, 2015 at 03:00:12PM -0700, Zach Brown wrote: >>>> The criteria for using O_NOMTIME is the same as for using O_NOATIME:= >>>> owning the file or having the CAP_FOWNER capability. If we're not >>>> comfortable allowing owners to prevent mtime/ctime updates then we >>>> should add a tunable to allow O_NOMTIME. Maybe a mount option? >>> >>> I dislike "turn off safety for performance" options because Joe >>> SpeedRacer will always select performance over safety. >> >> Well, for ceph there's no safety concern. They never use cmtime in >> these files. >> >> So are you suggesting not implementing this and making them rework the= ir >> IO paths to avoid the fs maintaining mtime so that we don't give Joe >> Speedracer more rope? Or are we talking about adding some speed bumps= >> that ceph can flip on that might give Joe Speedracer pause? > > I think this is the fundamental question: who do we give the ammunition= > to, the user or app writer, or the sysadmin? > > One might argue that we gave the user a similar power with O_NOATIME (t= he > power to break applications that assume atime is accurate). Here we gi= ve > developers/users the power to not update mtime and suffer the consequen= ces > (like, obviously, breaking mtime-based backups). It should be pretty > obvious to anyone using the flag what the consequences are. The difference is that the only widely used program that uses atime for=20 anything is Mutt (and many people who don't use Mutt just disable=20 updating it altogether to improve performance), whereas mtime is used at = the very least by many backup tools, and pretty much all NFSv{3,2}=20 clients, as well as a number of other pieces of software. > > Note that we can suffer similar lapses in mtime with fdatasync followed= by > a system crash. And as Andy points out it's semi-broken for writable > mmap. The crash case is obviously a slightly different thing, but the > idea that mtime can't always be trusted certainly isn't crazy talk. > > Or, we can be conservative and require a mount option so that the admin= > has to explicitly allow behavior that might break some existing > assumptions about mtime/ctime ('-o user_noatime' I guess?). Personally, I agree that there should be a mount option. We should make = sure to put a big fat warning about it in the manpage however,=20 irrespective of how it is controlled. > > I'm happy either way, so long as in the end an unprivileged ceph daemon= > avoids the useless work. In our case we always own the entire mount/di= sk, > so a mount option is just fine. > Thanks! > sage > -- > To unsubscribe from this list: send the line "unsubscribe linux-kernel"= in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > Please read the FAQ at http://www.tux.org/lkml/ > --------------ms080309030200030901010807 Content-Type: application/pkcs7-signature; name="smime.p7s" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="smime.p7s" Content-Description: S/MIME Cryptographic Signature MIAGCSqGSIb3DQEHAqCAMIACAQExCzAJBgUrDgMCGgUAMIAGCSqGSIb3DQEHAQAAoIIGuDCC BrQwggScoAMCAQICAxBuVTANBgkqhkiG9w0BAQ0FADB5MRAwDgYDVQQKEwdSb290IENBMR4w HAYDVQQLExVodHRwOi8vd3d3LmNhY2VydC5vcmcxIjAgBgNVBAMTGUNBIENlcnQgU2lnbmlu ZyBBdXRob3JpdHkxITAfBgkqhkiG9w0BCQEWEnN1cHBvcnRAY2FjZXJ0Lm9yZzAeFw0xNTAz MjUxOTM0MzhaFw0xNTA5MjExOTM0MzhaMGMxGDAWBgNVBAMTD0NBY2VydCBXb1QgVXNlcjEj MCEGCSqGSIb3DQEJARYUYWhmZXJyb2luN0BnbWFpbC5jb20xIjAgBgkqhkiG9w0BCQEWE2Fo ZW1tZWxnQG9oaW9ndC5jb20wggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCdD/zW 2rRAFCLnDfXpWxU1+ODqRVUgzHvrRO7ADUxRo1CBDc3JSX5TIW2OGmQ3DAKGOACp8Z0sgxMc B05tzAZ/M7m4jajVrwwdVCdrwVGxTdAai7Kwg4ZCVfyMVhcwo8R2eW3QahBx34G0RKumK9sZ ZQSQ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cix0TQpxX7Ght+qgMppT8vzOwe7g0twVatJ3zaZzgBB mCX+D/e1zHTV0h1VDaJLYzZovVKT+LTQ+ml+eOmwMM+MDW4hTqjAE4QbgzhvAAAAAAAA --------------ms080309030200030901010807-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/