Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp954164ybg; Wed, 10 Jun 2020 19:07:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx3+BeCWQxoi8w5MJQmJMPSLj8gb1hH7Vl1Heklnh6dJACLXjRTZ8dcnsNC5KdHnAo/fsKU X-Received: by 2002:a50:f052:: with SMTP id u18mr4870852edl.16.1591841264596; Wed, 10 Jun 2020 19:07:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591841264; cv=none; d=google.com; s=arc-20160816; b=uMaHlOgrDDDI0BpwsCFtV2UhtQJTiWHoCqgi1A9rIUbRt2y6MRFFUeMRY5kVdjSL4M R0p2gSK8BPFW/mjeXkH/e4clgyRNtCoSBIbo6rm5e+pqZlQJLHs+0KbS+Rod2wt6wuJV M4DM9S2N+uMRlWbQ6QS72Ea9mijnb2AG6OryuNuJTdtk1OaZPKnNioxtPGNLOEgKyeAE zZE6KrFcRf/rARprFlt6TSTw+2XfGNpzUIIXZkfmtGhky84/9hmp0ar6jN+ps5QNwqeI MI3npCPvjz2nu0Xy2YIkQCSbBaydfFabc+MCmDKtT/np/8+0XiHHkoyduhDSmuQ60jfS BqoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=hnHKIzS41GEo89Iuw03X5GmSxi7D1lwQQJW4EUMasuw=; b=ahP0XYdoxqiM1dpZHgGOCluX4m8lfMi8Px2MDrMo2rhWpI2Jk7iN8Wtr6kZWTpD7xh GtGWfXx6btnEu4ChXtNqF9nufXrhY1Xvu2EhWqlnaERLP0SzHz5Aae3d3Qxg6d/wpFFh eKTZG+NoAztQoTrz5ODzmMCjHiXCOaG5E+AGmQvEeSZQ1gmHUqXgYx+u5X3MwlcbvHbe 1psecOJ3BBCXZQh0bYPwSTNiQHE8jQhEEaFD8fSkxUkdF4iYhwzqhZnGe+6kFkB9p9mQ q9MvoR52SmsIROGjAyooVwd4m/qVAHlw3NRRf2DzmwzAPRqcx1D45JuqTg3fRCg6+8Mu zQwQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rAdfqTa6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f23si1170141ejy.135.2020.06.10.19.07.19; Wed, 10 Jun 2020 19:07:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=rAdfqTa6; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1726306AbgFKCF1 (ORCPT + 99 others); Wed, 10 Jun 2020 22:05:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726163AbgFKCF1 (ORCPT ); Wed, 10 Jun 2020 22:05:27 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A4B6DC08C5C1 for ; Wed, 10 Jun 2020 19:05:25 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id x22so2623135lfd.4 for ; Wed, 10 Jun 2020 19:05:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=hnHKIzS41GEo89Iuw03X5GmSxi7D1lwQQJW4EUMasuw=; b=rAdfqTa6+gIX/5dokn44QP7FxNEPlLZQBT4iSMRctA6FapNrfwSqgJ2c6joLmBDKe2 KOemYJhFqy3xzk0yT3ONnQvy2RBMtcQF33RRSgw20SZRfjuFnq1PjQiSR/THpgyIA7CQ ZWWDaJ/dbk687ltRarmYsbZOyFfndJhnY6qNV2QuJJXYdoj/W6LdMOoEFWoaiZCXSBHi /YQWmFMdfEDninsH5hnglKA5NXGpU4E1wp+NFtTp9FXrvEX3kAjrewhz4QKHaLVQf9CN 3uaVYK+SqNhS7yTuct7vtMt/wlWvWzxyi0+9+2nMuhYK0wdXrBbvM+Bp/FY2Lkh9QJ0t 30Sg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=hnHKIzS41GEo89Iuw03X5GmSxi7D1lwQQJW4EUMasuw=; b=fkZRHnFlrlucAnMZzXBKbNXuLr3VoHm9BIZ2WVBkJJQ2qdAzLjO2QYB44l3boMH/AN Biq4lebmC8/qE3a/gDHxAS4jBPKEMg1S6+rWnn+bgPe1AJ85xNiMfYQI1PZRxJN7wbFW jHP+0f0vM9TrO9bxSsZK6ISm6ZvYMsm0y+7/4xkqRN0+Hh+/Tz/U7nnKRdGoQwJfIoHN Q7siRi5klbM/+0eI6nHui3UK9DDbf/6coLvzjriQcmFh7ch0mSJ012nwRLxDiTbOPOmk u3ZDR0qAsXS6JUd9mW/Vl3P/RB+TYWqh7zE5qyXOfW7IsytF1wZtiVrAQMqVrQjRwnx3 +WVg== X-Gm-Message-State: AOAM530F6ad1TXfyfxZ4IQO6YuJk4BIMmKIUcC2aAnoDbvR4wrbHe1KR mr7atz5yG03g32HW4/yIyStelmMMlgrjxELIYjXqkYtdRcQ= X-Received: by 2002:a19:6554:: with SMTP id c20mr3051122lfj.140.1591841123919; Wed, 10 Jun 2020 19:05:23 -0700 (PDT) MIME-Version: 1.0 References: <20200609060137.143501-1-daeho43@gmail.com> <20200609165107.GA228564@gmail.com> <20200610031532.GA6286@sol.localdomain> <20200611000037.GC1339@sol.localdomain> <20200611015651.GD1339@sol.localdomain> In-Reply-To: <20200611015651.GD1339@sol.localdomain> From: Daeho Jeong Date: Thu, 11 Jun 2020 11:05:12 +0900 Message-ID: Subject: Re: [f2fs-dev] [PATCH] f2fs: add F2FS_IOC_SEC_TRIM_FILE ioctl To: Eric Biggers Cc: linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, kernel-team@android.com, Daeho Jeong Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Ok, I got it. Thanks for quick response~ :) 2020=EB=85=84 6=EC=9B=94 11=EC=9D=BC (=EB=AA=A9) =EC=98=A4=EC=A0=84 10:56, = Eric Biggers =EB=8B=98=EC=9D=B4 =EC=9E=91=EC=84=B1: > > On Thu, Jun 11, 2020 at 09:23:23AM +0900, Daeho Jeong wrote: > > Yes, I saw the implementation in vfs_write(). > > But if we use mnt_want_write_file() here, it'll call mnt_clone_write() > > internally if the file is already open in write mode. > > Don't you think the below thing is needed? We can increase the counter > > each of them, open and ioctl, like other filesystems such as ext4. > > > > int mnt_clone_write(struct vfsmount *mnt) > > { > > /* superblock may be r/o */ > > if (__mnt_is_readonly(mnt)) > > return -EROFS; > > preempt_disable(); > > mnt_inc_writers(real_mount(mnt)); > > preempt_enable(); > > return 0; > > } > > No, this seems to be left over from when mnt_want_write_file() was paired= with > mnt_drop_write() instead of mnt_drop_write_file(). I sent a patch to rem= ove it: > https://lkml.kernel.org/r/20200611014945.237210-1-ebiggers@kernel.org > > - Eric