From patchwork Thu May 17 12:21:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Saugata Das X-Patchwork-Id: 8726 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 46BC223E23 for ; Thu, 17 May 2012 12:22:39 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 00B3DA186CC for ; Thu, 17 May 2012 12:22:38 +0000 (UTC) Received: by ggnf1 with SMTP id f1so2076096ggn.11 for ; Thu, 17 May 2012 05:22:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :mime-version:content-type:x-gm-message-state; bh=8hJ0Xo6n8HXp7PKcSkpkAXebu6F9T6e1uYkoHWDSCpQ=; b=Z3EKHl4CEvVhPLisrDOxOKuGe2HQhbPuCZuXN8txkleIO24q+N9pstXr70ta5L9CJz jVOmMxlFdBkbBlOtyLTl9XmYxsqf05i4USouKwtMrHESQFTEOgiS8a6JDUmKUTUQRbF/ QPpcLJiLZE8yhv/+IGX5UvzhRdQqRRCK7HAQJaSKyD6sI9N/BiIRDHn/fUMYwTGvZCTJ kCUQwWQ/EEFjhWBFrOFiGmbQiN8DkleQ1NjOuE1yCPrmiRZN8/ItcXHZrJ6J5HDlrFA/ disWjT1fn1FFZUfbf1hkbpx5n7leCy0xyfYN9K14qD60Nntv6o1S8ZSbSuDbX2OTiE28 t6xw== Received: by 10.50.222.202 with SMTP id qo10mr13268469igc.0.1337257358054; Thu, 17 May 2012 05:22:38 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.35.72 with SMTP id o8csp24210ibd; Thu, 17 May 2012 05:22:37 -0700 (PDT) Received: by 10.14.100.71 with SMTP id y47mr1468553eef.9.1337257356617; Thu, 17 May 2012 05:22:36 -0700 (PDT) Received: from eu1sys200aog104.obsmtp.com (eu1sys200aog104.obsmtp.com. [207.126.144.117]) by mx.google.com with SMTP id t48si1750551eeb.213.2012.05.17.05.22.27 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 17 May 2012 05:22:36 -0700 (PDT) Received-SPF: neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of saugata.das@stericsson.com) client-ip=207.126.144.117; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.117 is neither permitted nor denied by best guess record for domain of saugata.das@stericsson.com) smtp.mail=saugata.das@stericsson.com Received: from beta.dmz-us.st.com ([167.4.1.35]) (using TLSv1) by eu1sys200aob104.postini.com ([207.126.147.11]) with SMTP ID DSNKT7TtggBWHis0DgzpgfFKmebzmp5oS5dI@postini.com; Thu, 17 May 2012 12:22:36 UTC Received: from zeta.dmz-us.st.com (ns4.st.com [167.4.16.71]) by beta.dmz-us.st.com (STMicroelectronics) with ESMTP id CABCC59; Thu, 17 May 2012 12:21:40 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-us.st.com (STMicroelectronics) with ESMTP id 03F8E4A; Thu, 17 May 2012 09:53:57 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id A9593A8074; Thu, 17 May 2012 14:21:53 +0200 (CEST) Received: from localhost (10.201.54.119) by exdcvycastm022.EQ1STM.local (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Thu, 17 May 2012 14:22:04 +0200 From: Saugata Das To: , , Cc: , , , , , , , , Saugata Das Subject: [PATCH v2 2/2] ext4: annotate all meta data requests Date: Thu, 17 May 2012 17:51:30 +0530 Message-ID: <1337257290-28547-2-git-send-email-saugata.das@stericsson.com> X-Mailer: git-send-email 1.7.4.3 In-Reply-To: <1337257290-28547-1-git-send-email-saugata.das@stericsson.com> References: <1337257290-28547-1-git-send-email-saugata.das@stericsson.com> MIME-Version: 1.0 X-Gm-Message-State: ALoCoQlnBdtg/HrR+50BZ6ARe5ZMnfZ84UlkafJp0MnK8gyf3J3U2Zco8e6usyZNVgRNqdz6MYFD From: Saugata Das Today, storage devices like eMMC has special features like data tagging (introduced in MMC-4.5 version) in order to improve performance of some specific writes. On MMC stack, data tagging is used for all writes which has REQ_META flag set. On EXT4, however, currently REQ_META is set only for read. This patch adds the capability mark a meta-data buffer with set_buffer_meta during meta data write. During submit_bh, this information is used to set REQ_META flag. Signed-off-by: Saugata Das --- fs/ext4/ext4_jbd2.c | 4 ++++ fs/ext4/inode.c | 4 +++- 2 files changed, 7 insertions(+), 1 deletions(-) diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c index aca1790..097c062 100644 --- a/fs/ext4/ext4_jbd2.c +++ b/fs/ext4/ext4_jbd2.c @@ -107,6 +107,8 @@ int __ext4_handle_dirty_metadata(const char *where, unsigned int line, { int err = 0; + set_buffer_meta(bh); + if (ext4_handle_valid(handle)) { err = jbd2_journal_dirty_metadata(handle, bh); if (err) { @@ -143,6 +145,8 @@ int __ext4_handle_dirty_super(const char *where, unsigned int line, struct buffer_head *bh = EXT4_SB(sb)->s_sbh; int err = 0; + set_buffer_meta(bh); + if (ext4_handle_valid(handle)) { err = jbd2_journal_dirty_metadata(handle, bh); if (err) diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index c77b0bd..754fe77 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -4035,8 +4035,10 @@ int ext4_write_inode(struct inode *inode, struct writeback_control *wbc) err = __ext4_get_inode_loc(inode, &iloc, 0); if (err) return err; - if (wbc->sync_mode == WB_SYNC_ALL) + if (wbc->sync_mode == WB_SYNC_ALL) { + set_buffer_meta(iloc.bh); sync_dirty_buffer(iloc.bh); + } if (buffer_req(iloc.bh) && !buffer_uptodate(iloc.bh)) { EXT4_ERROR_INODE_BLOCK(inode, iloc.bh->b_blocknr, "IO error syncing inode");