From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 373CEC48BD5 for ; Tue, 25 Jun 2019 10:36:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 093162084B for ; Tue, 25 Jun 2019 10:36:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="KSxmR8lo" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 093162084B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=sspP+UuC64sEWtTTpKuZJ5kVhOYwDxjdVeANElde/tc=; b=KSxmR8loDPEz9u gZZWXJdmOTwyTu5mxPMZmi2ilCUF6Y9MoxJnSH0NL4dgqApP+LMVc1s6pqv6vT+jnkmqurzsHR9an Klbw43I1EJL5A8kxJ4raCH/+LtQgA5PdI+YZ6IbCOLQxL47WBxZlBmjPZ6elXNOKfHqfzxj+T8chF FbRadk/qD9FJOeFV7Oarz41mX4H2+NUksi3SIUSjG++8a5Gnktb1aiq+b4GiNJhkmcbALvBjMC3BQ cV8PbjYyKtHjK2SP8Qo5aB8eBaUj1smUX4UkrT6Vk4UfJ0V9w6/xdnVFOitKhyKSVs6++rWo14lxo 4LQbawZ3m94QH82fOcTw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hfioV-0001M2-9h; Tue, 25 Jun 2019 10:36:35 +0000 Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hfioR-0001Ln-BN; Tue, 25 Jun 2019 10:36:31 +0000 Date: Tue, 25 Jun 2019 03:36:31 -0700 From: Christoph Hellwig To: "Darrick J. Wong" Subject: Re: [PATCH v4 0/7] vfs: make immutable files actually immutable Message-ID: <20190625103631.GB30156@infradead.org> References: <156116141046.1664939.11424021489724835645.stgit@magnolia> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <156116141046.1664939.11424021489724835645.stgit@magnolia> User-Agent: Mutt/1.11.4 (2019-03-13) X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-efi@vger.kernel.org, linux-btrfs@vger.kernel.org, yuchao0@huawei.com, linux-mm@kvack.org, clm@fb.com, adilger.kernel@dilger.ca, matthew.garrett@nebula.com, linux-nilfs@vger.kernel.org, linux-ext4@vger.kernel.org, devel@lists.orangefs.org, josef@toxicpanda.com, reiserfs-devel@vger.kernel.org, viro@zeniv.linux.org.uk, dsterba@suse.com, jaegeuk@kernel.org, tytso@mit.edu, ard.biesheuvel@linaro.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, jk@ozlabs.org, jack@suse.com, linux-fsdevel@vger.kernel.org, linux-mtd@lists.infradead.org, ocfs2-devel@oss.oracle.com Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-mtd" Errors-To: linux-mtd-bounces+linux-mtd=archiver.kernel.org@lists.infradead.org On Fri, Jun 21, 2019 at 04:56:50PM -0700, Darrick J. Wong wrote: > Hi all, > > The chattr(1) manpage has this to say about the immutable bit that > system administrators can set on files: > > "A file with the 'i' attribute cannot be modified: it cannot be deleted > or renamed, no link can be created to this file, most of the file's > metadata can not be modified, and the file can not be opened in write > mode." > > Given the clause about how the file 'cannot be modified', it is > surprising that programs holding writable file descriptors can continue > to write to and truncate files after the immutable flag has been set, > but they cannot call other things such as utimes, fallocate, unlink, > link, setxattr, or reflink. I still think living code beats documentation. And as far as I can tell the immutable bit never behaved as documented or implemented in this series on Linux, and it originated on Linux. If you want hard cut off style immutable flag it should really be a new API, but I don't really see the point. It isn't like the usual workload is to set the flag on a file actively in use. ______________________________________________________ Linux MTD discussion mailing list http://lists.infradead.org/mailman/listinfo/linux-mtd/