Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp4769149rwi; Mon, 17 Oct 2022 10:24:44 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6c+zQxC9fWEpjgfpyy1YcGlj/WEwXhB79Yj442vbIYe9+A/UZoErIAXJ43yvrnTzC1O6Ho X-Received: by 2002:a05:6a00:1bc3:b0:562:ab5f:af2 with SMTP id o3-20020a056a001bc300b00562ab5f0af2mr13909436pfw.58.1666027484509; Mon, 17 Oct 2022 10:24:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666027484; cv=none; d=google.com; s=arc-20160816; b=GLWCwnABwm44RI5s4IZFe/1Ry4OcT9fo7DQV+TT7WGXJJiavipcxE8lpfVBP9OUUsK IY48Dbdnu5bOK6tj8zuV33aIpaTEwz6QNhhpfRmoNgHFGP7Q3aQB2brQFHwfEaOW67Th YyQeZgMFoKLqAqkRcdsMUjtYuLbkXchc1Q2OAs4Xt/Sf5mX2JqMm/mXQ6UE/1bgzEEXs K1wpax7adWY3PjA1dmn9HzdNVhi7zg4vJLIF73cAp4l7VQs3b+6UQByr4146z7+TUvdE Zj9uPup4bWPwa9VHb45NCi41GmoU2hCpjaO/4G71JIi/dkfOo4aMe75QSfjKrigXfUaX ViuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=1gM2OhPkZ6+CVHU/B6ywYxdhbtgkPzENmTLQaUuvjkI=; b=LML2ruOF3xRrPdlsjvQewyLJZrwWW3QprLfDnBwgos2Ug5jiaAd9aMCiyhBb3dlc2b LzhyZa1Cn/qwGkrAg8GonwM8b6lxrhM1niGzN1H0wmh+2vkQca0KsUyKQKVmLVSCZPxh cN9fAOIeYKR2NML7S3p1GRXf7R76MMQajU5o/YeCUU+0gBekWkzmI9pIIbPvQfsvNG5+ wml7MxzafJ+y4RDWsdDqX5rCR9AjflVzYANm20PQGDwAdbVAaObAz81hNf/tUSHRXSWk V5WHRVKJHwe3vHJL2pC0iHdVCE979CaroEmGOKvNf6RiA7+ke2AVz7aowmvjhB+Vl7pF sScg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cZIQgpIJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j15-20020a637a4f000000b004157aa8707csi11982320pgn.110.2022.10.17.10.24.31; Mon, 17 Oct 2022 10:24:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=cZIQgpIJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230070AbiJQRDy (ORCPT + 99 others); Mon, 17 Oct 2022 13:03:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56672 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230044AbiJQRDo (ORCPT ); Mon, 17 Oct 2022 13:03:44 -0400 Received: from mail-yb1-xb35.google.com (mail-yb1-xb35.google.com [IPv6:2607:f8b0:4864:20::b35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39A4070E5D; Mon, 17 Oct 2022 10:03:41 -0700 (PDT) Received: by mail-yb1-xb35.google.com with SMTP id k3so13987203ybk.9; Mon, 17 Oct 2022 10:03:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=1gM2OhPkZ6+CVHU/B6ywYxdhbtgkPzENmTLQaUuvjkI=; b=cZIQgpIJQMIYS77HywyT+t1No+jvE3iaIWeu9auSgMVTDDkiouT8bS/VE8qSdKT0d7 ozM1qOetOvplkyukd+qBZxkr/6vTKMLKt7PUFZzF/0LCSQHtLqKu5MUsdgH10hWpnr5H 4/21CuM9XyiM5QgBk5Pp9GqrpY9PRRieeJiUIRxWRp7TuGZFuZQwQagPv4ryPCsPHnX1 4wD+30MmtV04vpLsPmjY3pKLq/Zf8T2tiTmjy4yG9kNZBHlfdfx9oD/GIOqhEf73Mq8l 5rFU4v0nBIdfCVPGcf705WrSo4Xh9xFKZ1WgzZ4Xpr+uTaAxmPkQzptZWZrdjJUwm+I6 80DA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1gM2OhPkZ6+CVHU/B6ywYxdhbtgkPzENmTLQaUuvjkI=; b=wjDgPXXRQaluJNxU6BIu+SW0t4PTZVnsv9p/5Yq8+U+r1XQ9w3jfh45cqrGa7kpblV WK/jOZXcTFZjh3UojOp5SDRdjdXqMv99o4eOqHcQPwPjggZC5lCrcqUe+jjS/Ak27Vcn E11ZwX9z6zArfnO0S6KAXiceljoM3zZ2pCZio7HEPNFt6NuNqFv1sHwvWLbLtWd59VYT EBAVMj/zdCBnG8Vh44nKSj9H4kSnYWiXogZ/Fx7Xseps6LyZaZEKxrxfIsG6Wle5u2QW WD0OKdXtWfDomCvkLkotyALWLsbAzy9G6GGd1XWDOKnR8bZB9lOuPU6iunh8rYLHW4qE UFYA== X-Gm-Message-State: ACrzQf3nx6R7m7Hdi4hT/kFN9+jfVIaAw6Wc+rVT4zHpsVkMRhwuKoT/ 9+ZOR6OZ+eDxm41nH6hdzMyEpF6qNyv3ig3mFCE= X-Received: by 2002:a05:6902:1186:b0:6c1:653a:ba74 with SMTP id m6-20020a056902118600b006c1653aba74mr10104010ybu.546.1666026220102; Mon, 17 Oct 2022 10:03:40 -0700 (PDT) MIME-Version: 1.0 References: <20221004171351.3678194-1-daeho43@gmail.com> <20221004171351.3678194-2-daeho43@gmail.com> In-Reply-To: From: Daeho Jeong Date: Mon, 17 Oct 2022 10:03:29 -0700 Message-ID: Subject: Re: [PATCH v4 2/2] f2fs: introduce F2FS_IOC_START_ATOMIC_REPLACE To: "Darrick J. Wong" Cc: Christoph Hellwig , linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong , linux-fsdevel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Oct 6, 2022 at 9:32 AM Darrick J. Wong wrote: > > On Thu, Oct 06, 2022 at 01:33:34AM -0700, Christoph Hellwig wrote: > > On Tue, Oct 04, 2022 at 10:13:51AM -0700, Daeho Jeong wrote: > > > From: Daeho Jeong > > > > > > introduce a new ioctl to replace the whole content of a file atomically, > > > which means it induces truncate and content update at the same time. > > > We can start it with F2FS_IOC_START_ATOMIC_REPLACE and complete it with > > > F2FS_IOC_COMMIT_ATOMIC_WRITE. Or abort it with > > > F2FS_IOC_ABORT_ATOMIC_WRITE. > > > > It would be great to Cc Darrick and linux-fsdevel as there have been > > attempts to do this properly at the VFS level instead of a completely > > undocumented ioctl. > > It's been a while since I sent the last RFC, but yes, it's still in my > queue as part of the xfs online fsck patchserieses. > > https://lore.kernel.org/linux-fsdevel/161723932606.3149451.12366114306150243052.stgit@magnolia/ > > More recent git branch: > https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git/log/?h=atomic-file-updates Hi, It's a very interesting suggestion and we might use this in F2FS someday. However, I think it's not exactly matched for what F2FS_IOC_START_ATOMIC_REPLACE is doing now. Thanks for bringing my attention to this. > > --D