{"id":770,"url":"http://patchwork.ozlabs.org/api/1.0/patches/770/?format=json","project":{"id":8,"url":"http://patchwork.ozlabs.org/api/1.0/projects/8/?format=json","name":"Linux ext4 filesystem development","link_name":"linux-ext4","list_id":"linux-ext4.vger.kernel.org","list_email":"linux-ext4@vger.kernel.org","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<E1KhDCt-0004GB-KI@closure.thunk.org>","date":"2008-09-21T00:53:47","name":"ext4: Enable asynchronous commits by default","commit_ref":null,"pull_url":null,"state":"deferred","archived":false,"hash":"e0cffa0df532942831001e23bba94b75c8f8dea2","submitter":{"id":350,"url":"http://patchwork.ozlabs.org/api/1.0/people/350/?format=json","name":"Theodore Tso","email":"tytso@mit.edu"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/linux-ext4/patch/E1KhDCt-0004GB-KI@closure.thunk.org/mbox/","series":[],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/770/checks/","tags":{},"headers":{"Return-Path":"<linux-ext4-owner@vger.kernel.org>","X-Original-To":"patchwork-incoming@ozlabs.org","Delivered-To":"patchwork-incoming@ozlabs.org","Received":["from vger.kernel.org (vger.kernel.org [209.132.176.167])\n\tby ozlabs.org (Postfix) with ESMTP id 26CDFDDE41\n\tfor <patchwork-incoming@ozlabs.org>;\n\tSun, 21 Sep 2008 13:16:00 +1000 (EST)","(majordomo@vger.kernel.org) by vger.kernel.org via listexpand\n\tid S1752419AbYIUDPz (ORCPT <rfc822;patchwork-incoming@ozlabs.org>);\n\tSat, 20 Sep 2008 23:15:55 -0400","(majordomo@vger.kernel.org) by vger.kernel.org id S1752425AbYIUDPz\n\t(ORCPT <rfc822;linux-ext4-outgoing>);\n\tSat, 20 Sep 2008 23:15:55 -0400","from www.church-of-our-saviour.org ([69.25.196.31]:40965 \"EHLO\n\tthunker.thunk.org\" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org\n\twith ESMTP id S1752339AbYIUDPy (ORCPT\n\t<rfc822; linux-ext4@vger.kernel.org>); Sat, 20 Sep 2008 23:15:54 -0400","from root (helo=closure.thunk.org)\n\tby thunker.thunk.org with local-esmtp   (Exim 4.50 #1 (Debian))\n\tid 1KhFQP-0001fl-2b; Sat, 20 Sep 2008 23:15:53 -0400","from tytso by closure.thunk.org with local (Exim 4.69)\n\t(envelope-from <tytso@mit.edu>)\n\tid 1KhDCt-0004GB-KI; Sat, 20 Sep 2008 20:53:47 -0400"],"To":"linux-ext4@vger.kernel.org","Subject":"[PATCH] ext4: Enable asynchronous commits by default","From":"\"Theodore Ts'o\" <tytso@mit.edu>","Full-Name":"Theodore Ts'o","Phone":"(781) 391-3464","Message-Id":"<E1KhDCt-0004GB-KI@closure.thunk.org>","Date":"Sat, 20 Sep 2008 20:53:47 -0400","X-SA-Exim-Connect-IP":"<locally generated>","X-SA-Exim-Mail-From":"tytso@mit.edu","X-SA-Exim-Scanned":"No (on thunker.thunk.org); SAEximRunCond expanded to false","Sender":"linux-ext4-owner@vger.kernel.org","Precedence":"bulk","List-ID":"<linux-ext4.vger.kernel.org>","X-Mailing-List":"linux-ext4@vger.kernel.org"},"content":"Signed-off-by: \"Theodore Ts'o\" <tytso@mit.edu>\n---\n--\nTo unsubscribe from this list: send the line \"unsubscribe linux-ext4\" in\nthe body of a message to majordomo@vger.kernel.org\nMore majordomo info at  http://vger.kernel.org/majordomo-info.html","diff":"diff --git a/fs/ext4/super.c b/fs/ext4/super.c\nindex fb5766e..e6d5af7 100644\n--- a/fs/ext4/super.c\n+++ b/fs/ext4/super.c\n@@ -747,8 +747,15 @@ static int ext4_show_options(struct seq_file *seq, struct vfsmount *vfs)\n \t */\n \tseq_puts(seq, \",barrier=\");\n \tseq_puts(seq, test_opt(sb, BARRIER) ? \"1\" : \"0\");\n+\t/* journal_async_commit enables journal_checksum internally */\n \tif (test_opt(sb, JOURNAL_ASYNC_COMMIT))\n \t\tseq_puts(seq, \",journal_async_commit\");\n+\telse {\n+\t\tseq_puts(seq, \",journal_sync_commit\");\n+\t\tif (test_opt(sb, JOURNAL_CHECKSUM))\n+\t\t\tseq_puts(seq, \",journal_checksum\");\n+\t}\n+\n \tif (test_opt(sb, NOBH))\n \t\tseq_puts(seq, \",nobh\");\n \tif (!test_opt(sb, EXTENTS))\n@@ -902,6 +909,7 @@ enum {\n \tOpt_reservation, Opt_noreservation, Opt_noload, Opt_nobh, Opt_bh,\n \tOpt_commit, Opt_journal_update, Opt_journal_inum, Opt_journal_dev,\n \tOpt_journal_checksum, Opt_journal_async_commit,\n+\tOpt_journal_sync_commit,\n \tOpt_abort, Opt_data_journal, Opt_data_ordered, Opt_data_writeback,\n \tOpt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,\n \tOpt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,\n@@ -944,6 +952,7 @@ static match_table_t tokens = {\n \t{Opt_journal_dev, \"journal_dev=%u\"},\n \t{Opt_journal_checksum, \"journal_checksum\"},\n \t{Opt_journal_async_commit, \"journal_async_commit\"},\n+\t{Opt_journal_sync_commit, \"journal_sync_commit\"},\n \t{Opt_abort, \"abort\"},\n \t{Opt_data_journal, \"data=journal\"},\n \t{Opt_data_ordered, \"data=ordered\"},\n@@ -1145,7 +1154,9 @@ static int parse_options(char *options, struct super_block *sb,\n \t\t\tbreak;\n \t\tcase Opt_journal_async_commit:\n \t\t\tset_opt(sbi->s_mount_opt, JOURNAL_ASYNC_COMMIT);\n-\t\t\tset_opt(sbi->s_mount_opt, JOURNAL_CHECKSUM);\n+\t\t\tbreak;\n+\t\tcase Opt_journal_sync_commit:\n+\t\t\tclear_opt(sbi->s_mount_opt, JOURNAL_ASYNC_COMMIT);\n \t\t\tbreak;\n \t\tcase Opt_noload:\n \t\t\tset_opt(sbi->s_mount_opt, NOLOAD);\n@@ -2026,6 +2037,11 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)\n \t */\n \tset_opt(sbi->s_mount_opt, DELALLOC);\n \n+\t/*\n+\t * enable async commit by default\n+\t * Use -o sync_commit to turn it off\n+\t */\n+\tset_opt(sbi->s_mount_opt, JOURNAL_ASYNC_COMMIT);\n \n \tif (!parse_options((char *) data, sb, &journal_inum, &journal_devnum,\n \t\t\t   NULL, 0))\n","prefixes":[]}