From patchwork Thu Feb 4 14:02:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Monakhov X-Patchwork-Id: 8221981 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E3CBB9F37A for ; Thu, 4 Feb 2016 14:02:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1232D2037C for ; Thu, 4 Feb 2016 14:02:14 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C955A20395 for ; Thu, 4 Feb 2016 14:02:08 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 9FF281A1DE9; Thu, 4 Feb 2016 06:02:08 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-lb0-x22f.google.com (mail-lb0-x22f.google.com [IPv6:2a00:1450:4010:c04::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id DE1DB1A1DE9 for ; Thu, 4 Feb 2016 06:02:06 -0800 (PST) Received: by mail-lb0-x22f.google.com with SMTP id x4so32214236lbm.0 for ; Thu, 04 Feb 2016 06:02:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:mime-version:content-type:subject:in-reply-to :user-agent:date:message-id; bh=f7XrSbNaJXeM+vUWhU8MK/hUc6+xWPnb4TN81jrpD7I=; b=TbaPPQrYaP409Q9p0ezeaesI3XhlbZiD8WgJ30EtEn8MZEOGKmSJQpq90EXTO42EZT RDQvO+xYSkTOM/QjcdcXO3CR3dWUwZaU/mv1XJO0R+sCl4CM+GI37IGq3skehmBapidf +SWMMMmo9S8CLs5Ttu4k4enwkGuog6RRdbO1Nr7OjyhWPt+GgKNSuLVfWlLn1W+Vsx+D B90C4a3alforAhSLexGLChB/fYUtinekqoGTP+bV1Fun70a5Utj/JvPw8smv5yBVF2H9 3ntI69S2GgCks4lgDdn+xXY7cBVuDNOGVrmZGhtGhacATBHrMChsvMmgA9GDeYLA2RFG 6x/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:mime-version:content-type :subject:in-reply-to:user-agent:date:message-id; bh=f7XrSbNaJXeM+vUWhU8MK/hUc6+xWPnb4TN81jrpD7I=; b=TB9oCS/fiUgNWoxQXucLE3tlszV3WfpGHyUTCfiw/7rp/SVGGe+fKT27IMjwuo6Jcc 6QA0OLenbXNawwHP30ygiRsnP11W2vqRVEu2rCiYmn8wRreDYrZzcxXytm2Cd0Qu24XE HTaEUz0/Fw8hm4bD8EJw8yCi9WIFPhAQu+vohj2rYA/K0CmWagMP3wVv4MAXPPhnLi2M FQVpk6LsG7FbRborn2t78pSa1PfNf+79GTOMFCSjXMT4q9xIw5XUHYuyFWx0azxApubN rPEwWMGfJXxdujpS35zZKFQZdvnVegqeN9I1mjxs1JD7HtV9SJ/x1TN/Gyc7/JZOoxL2 r/Dg== X-Gm-Message-State: AG10YOQGGJvFCt8gDCxJTYC7di1uY17V8f87cWjEhjbNneHbUuuPBYdmlWdZrPsDuDNtxw== X-Received: by 10.112.147.1 with SMTP id tg1mr2979000lbb.119.1454594524952; Thu, 04 Feb 2016 06:02:04 -0800 (PST) Received: from smtp.gmail.com ([195.214.234.4]) by smtp.gmail.com with ESMTPSA id l129sm1579172lfl.37.2016.02.04.06.02.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 04 Feb 2016 06:02:04 -0800 (PST) From: Dmitry Monakhov To: Ross Zwisler MIME-Version: 1.0 Subject: [PATCH] dax: dirty inode only if required In-Reply-To: 1450899560-26708-5-git-send-email-ross.zwisler@linux.intel.com User-Agent: Notmuch/0.18.1 (http://notmuchmail.org) Emacs/24.4.1 (x86_64-pc-linux-gnu) Date: Thu, 04 Feb 2016 17:02:02 +0300 Message-ID: <87k2mkr2ud.fsf@openvz.org> Cc: X86 ML , Theodore Ts'o , Andrew Morton , "linux-nvdimm@lists.01.org" , Jan Kara , Dave Chinner , "linux-kernel@vger.kernel.org" , Dave Hansen , XFS Developers , "J. Bruce Fields" , Linux MM , Ingo Molnar , Andreas Dilger , Alexander Viro , "H. Peter Anvin" , linux-fsdevel , Jeff Layton , linux-ext4 , Thomas Gleixner , Matthew Wilcox X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Dmitry Monakhov Reviewed-by: Jan Kara Reviewed-by: Ross Zwisler --- fs/dax.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/dax.c b/fs/dax.c index e0e9358..fc2e314 100644 --- a/fs/dax.c +++ b/fs/dax.c @@ -358,7 +358,8 @@ static int dax_radix_entry(struct address_space *mapping, pgoff_t index, void *entry; WARN_ON_ONCE(pmd_entry && !dirty); - __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); + if (dirty) + __mark_inode_dirty(mapping->host, I_DIRTY_PAGES); spin_lock_irq(&mapping->tree_lock);