From patchwork Tue Sep 20 20:57:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Josef Bacik X-Patchwork-Id: 9342415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A93F860B16 for ; Tue, 20 Sep 2016 20:58:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 945BB29B20 for ; Tue, 20 Sep 2016 20:58:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7FA0229B3C; Tue, 20 Sep 2016 20:58:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 012F029B21 for ; Tue, 20 Sep 2016 20:58:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754158AbcITU6a (ORCPT ); Tue, 20 Sep 2016 16:58:30 -0400 Received: from mx0a-00082601.pphosted.com ([67.231.145.42]:35776 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754049AbcITU60 (ORCPT ); Tue, 20 Sep 2016 16:58:26 -0400 Received: from pps.filterd (m0044012.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.17/8.16.0.17) with SMTP id u8KKsXwA010792; Tue, 20 Sep 2016 13:58:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=fb.com; h=from : to : subject : date : message-id : in-reply-to : references : mime-version : content-type; s=facebook; bh=2GaezPqMQfaJpkaZOUc/0T/CLYvaLRtjUYWDzfHZl8Y=; b=lPlalTtsev2aqR6zaF9ejX92RgjjEYB6yYf85ZxZFwsw1J55NAjcggq7N7SdYPkR20Mu 0p0qDQOxYergPqIAHPeB1+thPiJpJ+WS6M2QMEInkDeqxRbSUZASrDU+ipts34eOU1Jz nt1CY1SB+u1aqkN3XJZwFiEO4iIuWITyiIk= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 25ka6gs50e-3 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 20 Sep 2016 13:58:15 -0700 Received: from NAM01-SN1-obe.outbound.protection.outlook.com (192.168.54.28) by o365-in.thefacebook.com (192.168.16.14) with Microsoft SMTP Server (TLS) id 14.3.294.0; Tue, 20 Sep 2016 13:58:13 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.onmicrosoft.com; s=selector1-fb-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qvbF+KOC4hu5+6EWwmvAsD9HfC68VuU9IaNFx+mzaxE=; b=axuPLNL4CMxlFlEU8r2heH+aIwMQiE+cJ2HZsVztGqc74dBSZ5pqnT7U33QglIdV2hW5pnmlhMFoZqo3bqgTar4fbgaEHPJhJIhvKAsIV+eH5gknkbwtVoiRoy5LiXWokEmI1wep+9iJLimIXvxvKCXX/wVNWMmI46inF9U8h20= Received: from localhost (107.15.72.49) by MWHPR15MB1328.namprd15.prod.outlook.com (10.175.3.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.629.8; Tue, 20 Sep 2016 20:58:11 +0000 From: Josef Bacik To: , , , , , , , , Subject: [PATCH 4/4] writeback: introduce super_operations->write_metadata Date: Tue, 20 Sep 2016 16:57:48 -0400 Message-ID: <1474405068-27841-5-git-send-email-jbacik@fb.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1474405068-27841-1-git-send-email-jbacik@fb.com> References: <1474405068-27841-1-git-send-email-jbacik@fb.com> MIME-Version: 1.0 X-Originating-IP: [107.15.72.49] X-ClientProxiedBy: DM5PR18CA0008.namprd18.prod.outlook.com (10.175.218.146) To MWHPR15MB1328.namprd15.prod.outlook.com (10.175.3.142) X-MS-Office365-Filtering-Correlation-Id: c7f6f054-c672-4518-12c8-08d3e198d518 X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1328; 2:h2BmvW3uig+XFVzV8ZP965sIMbxbu90IZLF/87nfdB2QqcqvSLFN+tjO6oKrf/gYN6V7Y0rkpnW/dUKFDU92s43CHiXt2LU3lfzZSiB6PMImryUEX78A1wuYZI+sR/FWEqWCO5PEccurW+IVza3klfTVx5xCrqjgUOifhMBo5Z+3+jLNmsUXHzijtmWsB3If; 3:MNmvbMCxGyacBpwo7iH8hIKNadEzZg/ts6SjJPYGLJmxsxSi3qz0ZVaIHENNeFuT494G+0wX5F35GySiHwNSeB6CuzMyODUgGTdM/ldkLb1SlPvvIHz6o5jOa7FFRpj+; 25:qxHeOLMbNSxANI5mXjvsN2OZ9t6QjfeLeKE2k3vjQT8aRcQtdZ7WqNO+PvEeqK5MnQut+z0ZQJjQpADZUZrECXrS364FiORHUVLEkoEix6+lr63dJKOxKGtcUAI/4lpT0q6tiS2eJN3zPob7dBperdi/xhaL9cCEZjBo1VBmuRCdnTCcY8cGlPcEibIcXb35G4PDv8wTx25jzUkF/+ImZvEaLt+9FkV5liJ/UY5dR0q2bGS9M8wVDwCElf8FmNllnGVY66fQICWakarMoVS6A+vaaYfddeYLaKUc/FQxdO0USqFn8ozz1RWdPkrcKVcTa/vSmIC/Ii99fUezg0J34+lH0Yqzcn/ol2K9qLgtFnD96moV87e0ovs4YMKAPBZUaa2KSU7K36t0Y69ssEII7aY7PISGQ9fZiZcVWShyNIY= X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:MWHPR15MB1328; X-LD-Processed: 8ae927fe-1255-47a7-a2af-5f3a069daaa2,ExtAddr X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1328; 31:VLUIOWAGGKrOEkggrxYqJVJgBmiAANucb69mawsS/pcbRme09MWM289Pq1KbHSXsLib5YIwNKUVqCejOfodkuteM6lmAsqJtLmu5rim04n91HfvY5pv37QnWKyVvyeV4IDdeXs/tf8M/ZcvxJFc+yVPplgi6cJ7fHm85KtD2faRiBHzxoaQ/YPGSmVIj1lOXOtYwf7u7KIAguHhYfktCx7WILc6siobnBi3tzHek4rs=; 20:0+9rQMBcUs+C5Px7JUnFCmJXPfLZiospLUB+7/v3fRT4fj7z+WD5XunUyxMXA/8HB9qNoFmvRXfw1NH1++22M21xbUNMgXANdp7eF4Wn/eZC29R+8AehN6dqV24vE1HROLe6lBjyc5msHwOplcNdHy7svR350zfY7RqjG5Wkw7Y=; 4:cxi34JqaDlcgADPv4DCEkZQJ8ERIrGIL6i84cTqiOqxWjOFLmyjvns+Qg8QUHGQ1ze7TfXwfxLrWt710SmS1or7hkAgbRhNbhiol0BOPGatMT7bcdS1LmPZeypD0CCQiGHgUTtXuGO5/YS1Cwf0AczLZpzFBZWRzzph48rh6fV5ZXblrWSBuY/Sh3B62ZXfHRvju4J//ErqcIHFa8hgJJEc9p+YoG3J2IF/PWmnGGeqvtKa5wF94DXoE4Ax/V9T1jjosuX8DpIpr2oT46QxVeg9LJntk2DBGlJDSoZf23FguZaKIcv1gm2IXsoDpfG6oR2mj8NvY3e6RvM4qD78rca6v8GKKDJRHV80xFC7QEehUovO0r3IKiyEU0QJRshyHjCKVW6h7Yy34YuoAvjAuAae4ZWVOkZdkYZhMEHmBaFG7HguiPvMBSS6ER2ZBsHW1 X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(67672495146484); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040176)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046); SRVR:MWHPR15MB1328; BCL:0; PCL:0; RULEID:; SRVR:MWHPR15MB1328; X-Forefront-PRVS: 0071BFA85B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(6069001)(7916002)(199003)(189002)(5003940100001)(2950100001)(7736002)(7846002)(97736004)(92566002)(33646002)(305945005)(107886002)(5001770100001)(42186005)(50226002)(77096005)(86362001)(36756003)(2201001)(575784001)(8676002)(81166006)(81156014)(189998001)(50986999)(2906002)(105586002)(586003)(66066001)(19580405001)(19580395003)(5660300001)(101416001)(106356001)(76506005)(76176999)(47776003)(229853001)(6116002)(48376002)(3846002)(50466002)(68736007); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR15MB1328; H:localhost; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: fb.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; MWHPR15MB1328; 23:NK89amD0+qVyRx4YTrD1emxvUYjuzfe54ppuJksRV?= =?us-ascii?Q?jo3PJTlEmAtipcYIrjsOKe7KP7bYaUzmWg96ldje63rb9Z5Iyk9QyLICErWA?= =?us-ascii?Q?fJ/KkkYWkU0XmsPnxNHihZ+G83Cl86osXh7Ye7Tv1igXQk4uxxoQvVF1HEw5?= =?us-ascii?Q?H51GV4DMLvgqkysFkYXz3M3ajtHqmDI7O6eOlINbvF3CWLtjLUkEoS62781h?= =?us-ascii?Q?uTkx4OayJRfD3j6487FpHQaVMmEi3sIA+jsuMhpEn1UrG4t6Y+pmfrlX8p3l?= =?us-ascii?Q?UR8pVt3XVRv8lRADYS06fgc44NmzFHHO+QQ3F9oh4X9SPdSGd66fKJq14648?= =?us-ascii?Q?OAfAoUUxe9WKXdKrmDwhjPlimw/dLjOEbzSVv4SX13us+iIuCrH2W3MKZzl2?= =?us-ascii?Q?4GB/BKuAPr8MygUUVbb38HtepsTaa1J0OyRUbTJ94jrYjuJmLj+0Zlzgn40Q?= =?us-ascii?Q?6vG0DnV96LScwgfIrk6sC63dDluohTNHLRbTD292JJ3I3A0afzriN5d9okUn?= =?us-ascii?Q?eaOFIma5tMw1GMa1FhawHuekR5me/QQj4j18a9Bowoxz8TTGAtuRoIdg7zcL?= =?us-ascii?Q?+t7+votRM75aXgam0Sgv4oE5o6djVR2AV3d3CUB2Eu7/mFiUS12ikrXsQhNK?= =?us-ascii?Q?cpNADGUw6ikvtn4/7kq2DxJnY2WOQf1TeQR9kJ8HEET+9AqRX/7Wu3RpnKD7?= =?us-ascii?Q?45yIMYJ8Sf4TJVSWD2aiQtM1fTubqiCA/q2pBA7ljr44mBIOvHahaYBLYxMT?= =?us-ascii?Q?0HLA+TKBkWIp+Mu3LL3lKH+ccXDSfDifyELnpp1wR2ONfNDBvPglndwbf4Tm?= =?us-ascii?Q?nO9/uMT5Gxvf2fm48wCw68gW01xX194j9GWwMPVi2PrbCpSW2HPAuNxNChsB?= =?us-ascii?Q?UEFMweF3P1A3CdvbPGr1Pwmxc9os0ueucu8rluOXlvTNNXznf0NwqlA0GpKu?= =?us-ascii?Q?1y3pNwfh96q0nNI53BdcJpduxAKzPbxmH/hhfq5FuSD6bGE/m6ASbZ8Z7WZn?= =?us-ascii?Q?p1JoF5PJrmb5R74QvAQZgHOxgxnLaRZLU33GXslUVG0ozCiwrbdKk8pWnVgM?= =?us-ascii?Q?p0uNgec6Y+hr6J+8yaLupzVvEZSUuqZfIVy8jUGgmLxb7Rg10xFwNTnxe+Kc?= =?us-ascii?Q?awHK1LujMIR0ZI4rNDF3bcGQjjsJ3+fDo6O5Vkhjy9l7gegliIaow=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1328; 6:Qk7VCFuUMYfWkoafDzyhnO/JBsrHQ5f8FpQ2O/OencA7+b19D93UBkXDxG1R0KpYnVzKf05rYhMJd5QG1OLuRgvSxBeJ6Q+c2tnECR1RrEpvSfqJgddGpUeQNs1/9J0kf8OKiz0jepOpAXTi471WFttKL3CJFcQ40lbw6OrvTnkDqTX2DGt4j8he9OVM7/qTmVddybkdCH+sNfVQNUZ5UMFpBPf8VTR2dkErJKXkdxJQleVFb9ZqHTgd0JlWoqg7+cdTgig9Jjyy3UY7Ecw2kK0NzT3/zTOB1zNCKiAe+KQ=; 5:w+I/nXJGkf5HSWOjlvBWX6rm6IpB9cWI2YKdUp2e8oSxvMdAUREBhBcp812A/zyLWAdeoKWgeFrZNFLO75UoVtcnGAdR8BxgZT1tPJaU+SJ1xzHtwE6hwvoyUfTRAeE8o2dfGzeGa90tY1hgBOv9Ng==; 24:41kLvOhnC4MUixIALf0OHgaw1wevhZdE4EDh2nhnL0Y1dDPhQ4Xt1Hscmc0fqLVn7ob4Ne+goNz1rv1pr6X0CtJblyMS4fE1C77PmnVmGfU=; 7:4lha8JELuRLwLcgPeclyUjrutPgoHJrd7uYy5hU1kSrSrCgNj21H5AnFw2u65EPXBSgIQYtULzfI771aGZzQLKRXrhttrcxwBwRZRibXAZcJBZc4QVa8Dk97l+NPY0dGG8/RPjalXGyrjk87caEDgWqG2g3byuCairlbVgNzUsOKWpuZz3baPDlIENBkQ+I8voaQ/LlnSXhBWqfenLiDKPiQRsBvhAk4p0gYar2SuZ81LGf4s7rUTqzXl7lRzxysF5r1Tx7iLAXgEUb9TzN98VuQi3Xb3iGuMMc6sBAG8GNWtkT420HxWlZuGg1cghcC SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; MWHPR15MB1328; 20:MKRRq4YqTFBjoTxVVQuFppWVQ2mGfOZkLl+MML7fn6pkqv9x1mCThBWgjFDOapHrZbFz5mWO/atwMczpz+fSaG5/Jckr4icRe8lOGiqEyYRudZoFSWrW/bIeflQJN7bpBYhxCxILa69im7/69mc6HO65tlaBdSwyaBRSLylrU5c= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2016 20:58:11.3823 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR15MB1328 X-OriginatorOrg: fb.com X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2016-09-20_08:, , signatures=0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Now that we have metadata counters in the VM, we need to provide a way to kick writeback on dirty metadata. Introduce super_operations->write_metadata. This allows file systems to deal with writing back any dirty metadata we need based on the writeback needs of the system. Since there is no inode to key off of we need a list in the bdi for dirty super blocks to be added. From there we can find any dirty sb's on the bdi we are currently doing writeback on and call into their ->write_metadata callback. Signed-off-by: Josef Bacik Reviewed-by: Jan Kara --- fs/fs-writeback.c | 72 ++++++++++++++++++++++++++++++++++++---- fs/super.c | 7 ++++ include/linux/backing-dev-defs.h | 2 ++ include/linux/fs.h | 4 +++ mm/backing-dev.c | 2 ++ 5 files changed, 81 insertions(+), 6 deletions(-) diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index aafdb11..8cd072e 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c @@ -1464,6 +1464,31 @@ static long writeback_chunk_size(struct bdi_writeback *wb, return pages; } +static long writeback_sb_metadata(struct super_block *sb, + struct bdi_writeback *wb, + struct wb_writeback_work *work) +{ + struct writeback_control wbc = { + .sync_mode = work->sync_mode, + .tagged_writepages = work->tagged_writepages, + .for_kupdate = work->for_kupdate, + .for_background = work->for_background, + .for_sync = work->for_sync, + .range_cyclic = work->range_cyclic, + .range_start = 0, + .range_end = LLONG_MAX, + }; + long write_chunk; + + write_chunk = writeback_chunk_size(wb, work); + wbc.nr_to_write = write_chunk; + sb->s_op->write_metadata(sb, &wbc); + work->nr_pages -= write_chunk - wbc.nr_to_write; + + return write_chunk - wbc.nr_to_write; +} + + /* * Write a portion of b_io inodes which belong to @sb. * @@ -1490,6 +1515,7 @@ static long writeback_sb_inodes(struct super_block *sb, unsigned long start_time = jiffies; long write_chunk; long wrote = 0; /* count both pages and inodes */ + bool done = false; while (!list_empty(&wb->b_io)) { struct inode *inode = wb_inode(wb->b_io.prev); @@ -1606,12 +1632,18 @@ static long writeback_sb_inodes(struct super_block *sb, * background threshold and other termination conditions. */ if (wrote) { - if (time_is_before_jiffies(start_time + HZ / 10UL)) - break; - if (work->nr_pages <= 0) + if (time_is_before_jiffies(start_time + HZ / 10UL) || + work->nr_pages <= 0) { + done = true; break; + } } } + if (!done && sb->s_op->write_metadata) { + spin_unlock(&wb->list_lock); + wrote += writeback_sb_metadata(sb, wb, work); + spin_unlock(&wb->list_lock); + } return wrote; } @@ -1620,6 +1652,7 @@ static long __writeback_inodes_wb(struct bdi_writeback *wb, { unsigned long start_time = jiffies; long wrote = 0; + bool done = false; while (!list_empty(&wb->b_io)) { struct inode *inode = wb_inode(wb->b_io.prev); @@ -1639,12 +1672,39 @@ static long __writeback_inodes_wb(struct bdi_writeback *wb, /* refer to the same tests at the end of writeback_sb_inodes */ if (wrote) { - if (time_is_before_jiffies(start_time + HZ / 10UL)) - break; - if (work->nr_pages <= 0) + if (time_is_before_jiffies(start_time + HZ / 10UL) || + work->nr_pages <= 0) { + done = true; break; + } } } + + if (!done && wb_stat(wb, WB_METADATA_DIRTY_BYTES)) { + LIST_HEAD(list); + + spin_unlock(&wb->list_lock); + spin_lock(&wb->bdi->sb_list_lock); + list_splice_init(&wb->bdi->dirty_sb_list, &list); + while (!list_empty(&list)) { + struct super_block *sb; + + sb = list_first_entry(&list, struct super_block, + s_bdi_dirty_list); + list_move_tail(&sb->s_bdi_dirty_list, + &wb->bdi->dirty_sb_list); + if (!sb->s_op->write_metadata) + continue; + if (!trylock_super(sb)) + continue; + spin_unlock(&wb->bdi->sb_list_lock); + wrote += writeback_sb_metadata(sb, wb, work); + spin_lock(&wb->bdi->sb_list_lock); + up_read(&sb->s_umount); + } + spin_unlock(&wb->bdi->sb_list_lock); + spin_lock(&wb->list_lock); + } /* Leave any unwritten inodes on b_io */ return wrote; } diff --git a/fs/super.c b/fs/super.c index c2ff475..eb32913 100644 --- a/fs/super.c +++ b/fs/super.c @@ -215,6 +215,7 @@ static struct super_block *alloc_super(struct file_system_type *type, int flags, spin_lock_init(&s->s_inode_list_lock); INIT_LIST_HEAD(&s->s_inodes_wb); spin_lock_init(&s->s_inode_wblist_lock); + INIT_LIST_HEAD(&s->s_bdi_dirty_list); if (list_lru_init_memcg(&s->s_dentry_lru)) goto fail; @@ -305,6 +306,8 @@ void deactivate_locked_super(struct super_block *s) { struct file_system_type *fs = s->s_type; if (atomic_dec_and_test(&s->s_active)) { + struct backing_dev_info *bdi = s->s_bdi; + cleancache_invalidate_fs(s); unregister_shrinker(&s->s_shrink); fs->kill_sb(s); @@ -317,6 +320,10 @@ void deactivate_locked_super(struct super_block *s) list_lru_destroy(&s->s_dentry_lru); list_lru_destroy(&s->s_inode_lru); + spin_lock(&bdi->sb_list_lock); + list_del_init(&s->s_bdi_dirty_list); + spin_unlock(&bdi->sb_list_lock); + put_filesystem(fs); put_super(s); } else { diff --git a/include/linux/backing-dev-defs.h b/include/linux/backing-dev-defs.h index cef0f24..11cea63 100644 --- a/include/linux/backing-dev-defs.h +++ b/include/linux/backing-dev-defs.h @@ -168,6 +168,8 @@ struct backing_dev_info { struct timer_list laptop_mode_wb_timer; + spinlock_t sb_list_lock; + struct list_head dirty_sb_list; #ifdef CONFIG_DEBUG_FS struct dentry *debug_dir; struct dentry *debug_stats; diff --git a/include/linux/fs.h b/include/linux/fs.h index f3f0b4c8..f521187 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1430,6 +1430,8 @@ struct super_block { spinlock_t s_inode_wblist_lock; struct list_head s_inodes_wb; /* writeback inodes */ + + struct list_head s_bdi_dirty_list; }; /* Helper functions so that in most cases filesystems will @@ -1805,6 +1807,8 @@ struct super_operations { struct shrink_control *); long (*free_cached_objects)(struct super_block *, struct shrink_control *); + void (*write_metadata)(struct super_block *sb, + struct writeback_control *wbc); }; /* diff --git a/mm/backing-dev.c b/mm/backing-dev.c index f0695b0..541f532 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -785,6 +785,8 @@ int bdi_init(struct backing_dev_info *bdi) bdi->max_prop_frac = FPROP_FRAC_BASE; INIT_LIST_HEAD(&bdi->bdi_list); INIT_LIST_HEAD(&bdi->wb_list); + INIT_LIST_HEAD(&bdi->dirty_sb_list); + spin_lock_init(&bdi->sb_list_lock); init_waitqueue_head(&bdi->wb_waitq); ret = cgwb_bdi_init(bdi);