Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp1362336pxu; Sat, 24 Oct 2020 08:20:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3MDy3ICPVr78BB1i7oG0mtAgRuQFwYjq1iPPRIOYKSyZOIBoKwLd6SCgkcEHlxaoxTvMA X-Received: by 2002:a17:906:f151:: with SMTP id gw17mr7095470ejb.119.1603552830664; Sat, 24 Oct 2020 08:20:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603552830; cv=none; d=google.com; s=arc-20160816; b=xCEcywXms2CyepM1fnWv6Qt5BZoPAhA0uxp42QOSXbZdtOt5RBCnBTnAsCAzUO3UyW R3vIWtMmg4f1nOAMAp0elNoZGiAzrPj//E1AaS8Rrupzr3dfj621D4m/uaFOPRCuLyHm 2ebz+oehw3muRRwZ3d3vzSyM9IYMrSPEGOLNln4whM28h/yadim8glx9DUhkywup1hv2 kSgO2vSiPc4U2pGq/wdzyjIqgwyQoHn5p7lqtlBRYu3wNp6gPJlipdCWkLdbz0XXF6+N WRUQ0bmg+EPJwo+n5izB1wOSSR+H2hDb27UYuO4PNnxGLq2hBpcMTCZK44TY/9lFKg2y SOhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-disposition:mime-version:message-id :subject:cc:to:from:date; bh=eVttoSXvi/+R5QaLq4CVVO/8VY2PkGXsswXQjE147KQ=; b=w86k6/lZVw/CQngq4zpQfITiVWAsEVRsvYXXH7ItMrvyO9mqUihSFbLI8QseAvYpE2 gUW4GMkGn8N7hr4KMzDo7xuBkbXr/Yb0pREB/IiCBpP5GpTg42y3KBBmrfWAfGEwUNBE ceErV4A/SDCYSQkUVPpznyO2Sg1eXs8ARObW4UkCc72VaiwjfnpxeMTbtkhal4v0mDxK UrX2OR+m9VTtcT5HNZ31w9+zalJUPXkz0PA7SBF632vc3LXOH2AeaNNSG4+IyUxYwYNZ C2M4wrlorCrJXj7lX2xA8nOcxcl8uDBiN9rBiiz1rwXZmKfR5mOCNrgROkVWWqveG/9P MsFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e16si3148021ejc.699.2020.10.24.08.19.58; Sat, 24 Oct 2020 08:20:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-ext4-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761723AbgJXNNp (ORCPT + 99 others); Sat, 24 Oct 2020 09:13:45 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:33954 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726900AbgJXNNl (ORCPT ); Sat, 24 Oct 2020 09:13:41 -0400 Received: from mail-wm1-f70.google.com ([209.85.128.70]) by youngberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1kWJMZ-0007mY-GT for linux-ext4@vger.kernel.org; Sat, 24 Oct 2020 13:13:39 +0000 Received: by mail-wm1-f70.google.com with SMTP id l17so1182142wmb.0 for ; Sat, 24 Oct 2020 06:13:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition; bh=eVttoSXvi/+R5QaLq4CVVO/8VY2PkGXsswXQjE147KQ=; b=M6RbVff6okOiRkeaPkVyab38OulhctgcLyZoIlB8sI68oR4B9mf6sgJ8MNRkytJIib /3SfFp76XlezrjI+/DzcIiugZdDeK2ni2vQcEm5I/jBrQGblPURby1+fxBz46dQzHpEU Azf/P8VtZ3kjfLn4o+8z1OZ2db3rqVdDgQmfqyMK7TRhHi0o9ThuRyvXb2d020mlwHvG /3PVsUev+Ysh3QWd5ZwP/wK5194gRIojbm9HJGC5TPq2Ayqt+5JQgPgSWCATI7zyM8zb 2C4ycgncROYHOHBapN2QHGlhydSxpIanm28+T+3ianR7GzZR/BvlIUYQVzunrqQn3Tgk Po2A== X-Gm-Message-State: AOAM530d1VE5WNuFAdxNWNiDaRUROqFaN5JzOlCoV8l39uC/VMF60BwM /eTSp5bmqIjQZ9s+DWI+RqAXw0gxuCX4N46WqK/qCKc0PcfqPTUshWfElrFosKrrG3tzKTvHkWb 65ZbRt2b5CLzGycE3ov60IJ8ZWIZpGqSZZuwmtiU= X-Received: by 2002:a1c:f719:: with SMTP id v25mr6919188wmh.186.1603545219172; Sat, 24 Oct 2020 06:13:39 -0700 (PDT) X-Received: by 2002:a1c:f719:: with SMTP id v25mr6919021wmh.186.1603545216681; Sat, 24 Oct 2020 06:13:36 -0700 (PDT) Received: from localhost (host-79-33-123-6.retail.telecomitalia.it. [79.33.123.6]) by smtp.gmail.com with ESMTPSA id c185sm10661303wma.44.2020.10.24.06.13.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 24 Oct 2020 06:13:36 -0700 (PDT) Date: Sat, 24 Oct 2020 15:13:33 +0200 From: Andrea Righi To: Harshad Shirwadkar Cc: Theodore Ts'o , Andreas Dilger , linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org Subject: swap file broken with ext4 fast-commit Message-ID: <20201024131333.GA32124@xps-13-7390> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org I'm getting the following error if I try to create and activate a swap file defined on an ext4 filesystem: [ 34.406479] swapon: file is not committed The swap file is created in the root filesystem (ext4 mounted with the following options): $ grep " / " /proc/mounts /dev/vda1 / ext4 rw,relatime 0 0 No matter how long I wait or how many times I run sync, I'm still getting the same error and the swap file is never activated. A git bisect shows that this issue has been introduced by the following commit: aa75f4d3daae ("ext4: main fast-commit commit path") Simple test case to reproduce the problem: # fallocate -l 8G /swapfile # chmod 0600 /swapfile # mkswap /swapfile # swapon /swapfile Maybe we're missing to mark the inode as clean somewhere, even if the transation is committed to the journal? Thanks, -Andrea