Received: by 2002:ab2:b82:0:b0:1f3:401:3cfb with SMTP id 2csp493306lqh; Thu, 28 Mar 2024 07:55:42 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUjBhLZO10UHBVG866UdK6tRy4/MZoDuRUGM17jGuUn6wVf2T/63TL4FNO+JM3v+EW5h3ksQeLwnrW+f5ZOPsGdrlbiJD8WozhlMzdo3Q== X-Google-Smtp-Source: AGHT+IEUfLqxH59Ff6gLSjbd+HznSiXXsRrFWmjfEL+czIWiw/FbuTqkvKOyxWYy6X43/m9rmvQJ X-Received: by 2002:a05:6808:1906:b0:3c3:773b:1289 with SMTP id bf6-20020a056808190600b003c3773b1289mr3678429oib.5.1711637741839; Thu, 28 Mar 2024 07:55:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1711637741; cv=pass; d=google.com; s=arc-20160816; b=UOQBNB6MahggSoJbZf4TP8ovTmND1VCOb3RwjJfEsi20Q3QEQp9XFm/xLd5ajCeiP8 rahRCRKSrdzBEl51tv5lI4po39QCalKlJlFxIKk9IuVZcJsWWaPStIbKCB/ceZfpEuFH CXjntdjrQ3hl1OCWqaE8xNH/xvYdg/4j74SosZ4dz2qKJB5nVd2fF1diM3Pns2LQuRkP stXMKlNJ16idBH8a0Dumy7GGH290EEs8Q4g24upJhsEbrr45AslCJ0REF98LRlHiiBtz LMggJAVMTYI92I4txKIoylddScEJuL/8jOZOigqfxvUUiV34VF8Vd7Zi9JdgNagq/x/O 9jJQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :auto-submitted:content-transfer-encoding:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=ojJkWjfG1WQsayTMaHkh25yKIMP2f1Gf6GnZIAPAKFc=; fh=lfmAJNlsrgVlLfgmf+xa0zOkAKc6VKVRczifYgkRnAY=; b=eblvI+KUwEMyXjv2AmL3XM2RcIIYqtHclTIkcIuC+0o0Yn+uW7x42VzKzYErli0Y0N SLkJ6ZJymPt8JDakj0RCqkH7RppZvZbFgclM29fEHu3v9al6Azlvf9EAGaMEQlE2z609 M6qrxJzu+04i7Oik7v+Qta3WNImWRxSpqOjEfPxvzm/QDbazsM6rP51iEA8K1SWkYJ82 Gr6F3m7xZSGkyaDpIdeWoLAJoT9qiWlHUxTthLCZP4wRNTKwY9ythUlSGPeDeCnZ75iZ H1xFlkJFU2cTrZ/JT9ZUDWgFcfVokCY6YBvEa+1eqC8zx4q/lltntt3yutOvBSu1zez1 3K4Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ii/vC0jb"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-1765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1765-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id c8-20020ac87dc8000000b004317bcdb679si1534598qte.456.2024.03.28.07.55.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Mar 2024 07:55:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ii/vC0jb"; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-ext4+bounces-1765-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1765-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 8F2A11C25C7B for ; Thu, 28 Mar 2024 14:55:41 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B9ABC7E56E; Thu, 28 Mar 2024 14:55:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ii/vC0jb" X-Original-To: linux-ext4@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 32CFA2D044 for ; Thu, 28 Mar 2024 14:55:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711637723; cv=none; b=RVBshxg4K6Al3Iu5k6oIrBZkTCGCKlqUhrViR/D/71sDajOnpRulN9w8Y9E87GBCKJH3Aye9mFAUJQsBh5COwrxvWHDSWgNLwB2yjI3zm50yGoAxcMSnAmFrFF9Y4oguqeuqCxaM/nFQ5m+BB29YH1CFn1JdL09fw644yTJFOYY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1711637723; c=relaxed/simple; bh=VfbFI4lp11UJ8RvqxHSEWWnVhW4KQ5jTlFh3Wjq1z1s=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=saG8zNasaA/iSe+g4DetKQbKXhfe/9oHfQ98a0SO7DQORyyzlOz8d90sHDBNfbyvsJGx3IPLGzk84Bfs75uyW3fN2mohaL19raQlKuPkVqBibrZH3sA1amDANZF/CeQltG2x67UWJ6at4+Set7pwsY+SwOZbojYVEznN4evYVJ4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ii/vC0jb; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPS id BD080C433C7 for ; Thu, 28 Mar 2024 14:55:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1711637722; bh=VfbFI4lp11UJ8RvqxHSEWWnVhW4KQ5jTlFh3Wjq1z1s=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ii/vC0jbT6qRUGM3fGR9dajEN56JvrpaPcnKbA3+hZ0e+zsDKngKrWqSZlfaOngqg +dZzpiQua2QCl/Rx5ejtBRTrB6p+1iAPuCxgSmP9JQ6t2K3CHDaGrGjzKiwqMyssgP 05euw4VmTz0rqjjkbTKS/P3P4pVSmzEIP8QGVTFtN2Lidm2YFqTuVOx1KMMAssg7ds Kw1RhLRRB/NNgTjY+vDSZnSx0Wu9LbsycjPGLZuhGKC9y3UXUqUa0qEM40ZzS+lEKX oewNt+JwxkeK0sS9F6Sqz9/XBtr6cjNTt30CGdXk6Xll5RR+HD+kwSdPaiOZ9sPNnk RNqhaGodnVubg== Received: by aws-us-west-2-korg-bugzilla-1.web.codeaurora.org (Postfix, from userid 48) id B5123C53BD0; Thu, 28 Mar 2024 14:55:22 +0000 (UTC) From: bugzilla-daemon@kernel.org To: linux-ext4@vger.kernel.org Subject: [Bug 218648] ext4: previously opened file remains writeable on readonly ext4 filesystem; Data loss. Date: Thu, 28 Mar 2024 14:55:22 +0000 X-Bugzilla-Reason: None X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: AssignedTo fs_ext4@kernel-bugs.osdl.org X-Bugzilla-Product: File System X-Bugzilla-Component: ext4 X-Bugzilla-Version: 2.5 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tytso@mit.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: fs_ext4@kernel-bugs.osdl.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugzilla.kernel.org/ Auto-Submitted: auto-generated Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 https://bugzilla.kernel.org/show_bug.cgi?id=3D218648 Theodore Tso (tytso@mit.edu) changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tytso@mit.edu --- Comment #1 from Theodore Tso (tytso@mit.edu) --- Normally, if there is a file opened for writing when there is an attempt to remount a file system read-only via a command, e.g., "mount -o remount,ro /dev/sdc", the remount with fail with EBUSY. The problem is what should we do if the block device has failed or otherwise disappeared. In that situation, we can either do absolutely nothing ("errors=3Dcontinue"), panic and halt the system ("errors=3Dpanic"), or rem= ount the file-system ("errors=3Dremount-ro"). However, what should be done if there= is a file descriptor open for writing? 1) We could fail the remount, which would mean that the file system would continue to be mounted read/write, which would cause the behavior to devolv= e to "errors=3Dcontinue". 2) We could force the file system to be read-only, but any file descriptors that are still would be still open --- but attempts to write to the file wi= ll fail with EIO. We've chosen because it's the best we can do. We can refuse a remount read-only if it is initiated by the system administrator, if a user yanks t= he USB thumb drive out of the laptop, or a terrorist slams a plain into the machine room at the Pentagon, it's not like the kernel can stop something l= ike that from happening. ("I'm sorry Hal, I'm afraid I can't allow you to do = that ala the movie "2001: A Spacey Odessey" is not yet a thing; although maybe sometime soon our AI Overlords will have that power. :-) --=20 You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.=