Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4252176imm; Tue, 11 Sep 2018 09:05:30 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYWF7a0+YjS/bSkA/oVlH6/e/JMNo8AzUZlR5q71v+M/tC5oHb2sTC5WLfrjhKXC0g1+UaB X-Received: by 2002:a62:c182:: with SMTP id i124-v6mr30115116pfg.248.1536681930274; Tue, 11 Sep 2018 09:05:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536681930; cv=none; d=google.com; s=arc-20160816; b=DuEJOwIHBgUC1u8H3550XCQhzQMuC2ODDh8QHZoF26s/cdDr+IamBUyc/EAnMQ4248 SKY/DQ669oIq+AixPqbVTKP11EdnK7u2qpClA/QZfJBptUYDmf7Eo/CoxPqDbNFCfiYl 6zOzGvx7L0qtHDysU8E9vegkcM8LEr/5oB0LbBArnQ8SrHNnSjDItS85ZfFIuURKs5vW YnWUd6IaK0syBqIBb4RyPt8JXV2lqht/Y3g0z92KCuraB8ZmnZKrvpW6V0bu33LM+MQP Uk+CYuADOA/gE6hRt4tHo5fORaD8/EF2kwQjfqtPylMcdxZQGcLBykNdZIcw3vKz7x7h 01zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from; bh=sZkQdmzQaxiwKUfoUvdT/imwVmyDy6p/zXYO8nNKy3E=; b=mF9mgnBmlo99xLJ+/eoQJB9knGeSBqoufPyCfOkuQ/NttH2C6wH5WChZTvc+oFGmkd jRQdJ42lm45+txrcUz5aINK1A0wbocDEE/ojKLtYaPuNMRNFblQ9OEjMofZCgWIoV6yj GlE13LrhB1Ebqf9KrsazOI+BuPunRpbCluf3m1hkKqQVS5sYrCHPW7pk04M8oEMcO/fM GQC8Pg0OSx/SteDGXpjEhKQOpv/auT5al9lgckB8iXY6ksmCDDEzF5W8o8vq9fM21rTs v35Am/3VzSNk+FKEoFFKVGYjAlE6CcCeDJyYFPXfFbyt+4+DJaqj1GET/ZsfHf3WaR6V IWNw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z22-v6si18807284plo.219.2018.09.11.09.05.14; Tue, 11 Sep 2018 09:05:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727780AbeIKVDW (ORCPT + 99 others); Tue, 11 Sep 2018 17:03:22 -0400 Received: from g9t1613g.houston.hpe.com ([15.241.32.99]:10476 "EHLO g9t1613g.houston.hpe.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726818AbeIKVDW (ORCPT ); Tue, 11 Sep 2018 17:03:22 -0400 Received: from g2t2353.austin.hpe.com (g2t2353.austin.hpe.com [15.233.44.26]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by g9t1613g.houston.hpe.com (Postfix) with ESMTPS id CD42161149; Tue, 11 Sep 2018 16:03:24 +0000 (UTC) Received: from g2t2360.austin.hpecorp.net (g2t2360.austin.hpecorp.net [16.196.225.135]) by g2t2353.austin.hpe.com (Postfix) with ESMTP id D74F097; Tue, 11 Sep 2018 16:03:23 +0000 (UTC) Received: from misato.americas.hpqcorp.net (unknown [10.34.81.122]) by g2t2360.austin.hpecorp.net (Postfix) with ESMTP id 48DF03A; Tue, 11 Sep 2018 16:03:23 +0000 (UTC) From: Toshi Kani To: jack@suse.cz, dan.j.williams@intel.com Cc: tytso@mit.edu, adilger.kernel@dilger.ca, linux-ext4@vger.kernel.org, linux-nvdimm@lists.01.org, linux-kernel@vger.kernel.org Subject: [PATCH 0/2] fix sync to flush processor cache for ext4 DAX files Date: Tue, 11 Sep 2018 09:42:44 -0600 Message-Id: <20180911154246.6844-1-toshi.kani@hpe.com> X-Mailer: git-send-email 2.17.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patchset fixes an issue that sync syscall to an existing DAX file does not flush processor cache. Patch 1/2 adds a check to skip the journal inode. It's a bit awkward, but I could not find a beter way to get the journal inode. Patch 2/2 fixes the issue by moving up ext4_set_inode_flags() before ext4_set_aops() in ext4_iget(). This assumes updated i_flags is harmless in the error cases after the moved-up ext4_set_inode_flags(). Please review. --- Toshi Kani (2): 1/2 ext4, dax: update dax check to skip journal inode 2/2 ext4, dax: set ext4_dax_aops for dax files --- fs/ext4/ext4_jbd2.h | 8 ++++++++ fs/ext4/inode.c | 5 ++++- 2 files changed, 12 insertions(+), 1 deletion(-)