Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp1072128rdb; Fri, 2 Feb 2024 12:41:00 -0800 (PST) X-Google-Smtp-Source: AGHT+IFoS07ZBJTIhvonkeZuvdv+Kg+NshQigcaOTgxP+oQShcjMB6AWilWY7sqGsh+z2VomG6Zk X-Received: by 2002:a25:ec01:0:b0:dbe:eae4:286a with SMTP id j1-20020a25ec01000000b00dbeeae4286amr9242127ybh.51.1706906460171; Fri, 02 Feb 2024 12:41:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706906460; cv=pass; d=google.com; s=arc-20160816; b=mJtCMzBywdpswS3pIh43Q9FzbTQMaoaGH98M/qetMRTIV0PHswnK0JqsKpKrGlypks N/vh/DUaoBtH/+Uof8W2hqo+q93+w8S2OhedXR8hzJeka1y/K8Wx/0kbEK8+iIaqzQ7Y EtF09ml7ZBnY4j8KO7WNmmJJG+tPkCBk6NCuAW1yIvGBM5yU3H9N6z3K/PvVR1rNMCAS iy7DH4kVTXhGe4O7iioAPLaT+GJKGvK5KPw3OLpsrDT1Nxu6NpbqZK2YqeZWQAj4Hg8i ZMhrkKhXEigVQI6c6CkAUZTl3s2p5Iin8n/7IRCRQUk9xJpMYamjG8LRNctnRuoTWyC7 wrJQ== 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 :message-id:date:subject:to:from; bh=QJePYnM/uOmB+5xsaiQoaSHsfLs0WD+r3ajeQX4Gj6o=; fh=2i0wTsy/Tc3H8RdYch3uxVqItS6wL/AIrJ4Uh2Qwy+o=; b=DDl/CW1U+WGyaE8+hkw8RbQCJQ56sCCM+II/RwlzeiWA27reE41upsENT8zJbKSgoQ XTIsS8hUEW+/0D+0Bl8NjWUuM3O5rquwoj6BpZWkQeBOmyK6X8NOXNdyhl8+akD86y0V Ndmt/lw0xdgmsvJ0pya2SX4WfViZFvLfWN6H+vcyLD/fyeLTq0E2UNqxEEhA52D5H9S0 3AhBBUlTsLXIgGkbCuBUInARa3nKMTg2+SkAlITUT+OEZTOREzM8iJQ971aLUzdngPGm 1Eb8hY5pvSXGLHpEf8bWsSstl/gxpVuthYc5dIuGe3sfssqzRXLSVKzT+yCxnwAPJhBc AROQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-ext4+bounces-1069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1069-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCU8DXGjCC63LzEaQ0iVxKSX/TxqAcXQS2s7xgeYT1zpKAHNFLmZsm+L96DhsW/hmLxLImUTq1vQbixqczhqvz7DopEmRTIugKyUmiNd/g== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id n7-20020a0cfbc7000000b0068c45be246bsi2790217qvp.76.2024.02.02.12.41.00 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Feb 2024 12:41:00 -0800 (PST) Received-SPF: pass (google.com: domain of linux-ext4+bounces-1069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1); spf=pass (google.com: domain of linux-ext4+bounces-1069-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-ext4+bounces-1069-linux.lists.archive=gmail.com@vger.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 0B8121C2136C for ; Fri, 2 Feb 2024 20:40:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1E7093A1BA; Fri, 2 Feb 2024 20:40:50 +0000 (UTC) X-Original-To: linux-ext4@vger.kernel.org Received: from vps.thesusis.net (vps.thesusis.net [34.202.238.73]) (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 75FFB182AE for ; Fri, 2 Feb 2024 20:40:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=34.202.238.73 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706906449; cv=none; b=ZQz7UUb+7IcC2k51jz2Ofe3sSLF8ZOA5199a8hvAv6stXfNLHrF+IO9joU9vcmTaK2MUDN08ppM0endjjy0LG5+NPqfWjU2Q9TR2TqD+DemXxxiL/3zAng2ZJy6528EKcrfXu/JE0asRVogAfIfZsX2+Qu0o6JSKP82Vh+OneQM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706906449; c=relaxed/simple; bh=s8UDJn1GSpiHSwMB13nb5Vh0w0k7AGkr0ylvG3U6org=; h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type; b=Nuem9nSQBzrJItbXdRhSdQntgJrspzJrvfqIoO/v03/u78XLVVle/TYrq474xCEOXxqHz90lhyFnJrvhjfNn7f0SnRx2jtrwbacQ7zvQnH7WHkdJTg49yAEzkAbQZyhbLD5jxWiYJxEifsuGUT10r+OlxZmy2HqW8v2rGvM/9cc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thesusis.net; spf=none smtp.mailfrom=vps.thesusis.net; arc=none smtp.client-ip=34.202.238.73 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=thesusis.net Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=vps.thesusis.net Received: by vps.thesusis.net (Postfix, from userid 1000) id AB03C21F15; Fri, 2 Feb 2024 15:40:47 -0500 (EST) From: Phillip Susi To: linux-ext4@vger.kernel.org Subject: sync causing a flush with no data Date: Fri, 02 Feb 2024 15:40:47 -0500 Message-ID: <87il364n1s.fsf@vps.thesusis.net> Precedence: bulk X-Mailing-List: linux-ext4@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain I have noticed that when entering suspend-to-ram, the kernel syncs the filesystem, and ext4 issues a flush even though nothing has been written, causing a disk that has been suspended with runtime pm to wake up for no reason. It looks like ext4_sync_fs() calls jbd2_trans_will_send_data_barrier(), which returns 0, causing a call to blkdev_issue_flush(). Shouldn't this return a 1 if the transaction is empty?