login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-ext4
»
2010
»
April
»
12
Re: [PATCH 1/2] ext3: init statistics after journal recovery
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Dmitry Monakhov
Subject:
Re: [PATCH 1/2] ext3: init statistics after journal recovery
Date: Monday, April 12, 2010 - 12:34 pm
Jan Kara <jack@suse.cz> writes:
quoted text
> On Mon 12-04-10 23:12:55, Dmitry Monakhov wrote: >> Currently block/inode/dir counters initialized before journal was >> recovered. In fact after journal recovery this info will probably >> change. And freeblocks it critical for correct delalloc mode >> accounting. >> BUG:#15768 > Thanks for the patch. Could you please also rename failed_mount4 > to failed_mount3 so that the label numbering is continguous? Otherwise > the patch is fine.
Ok, in a minute.
quoted text
> Honza >> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org> >> --- >> fs/ext3/super.c | 38 ++++++++++++++++++-------------------- >> 1 files changed, 18 insertions(+), 20 deletions(-) >> >> diff --git a/fs/ext3/super.c b/fs/ext3/super.c >> index e844acc..613b5ed 100644 >> --- a/fs/ext3/super.c >> +++ b/fs/ext3/super.c >> @@ -1890,21 +1890,6 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) >> get_random_bytes(&sbi->s_next_generation, sizeof(u32)); >> spin_lock_init(&sbi->s_next_gen_lock); >> >> - err = percpu_counter_init(&sbi->s_freeblocks_counter, >> - ext3_count_free_blocks(sb)); >> - if (!err) { >> - err = percpu_counter_init(&sbi->s_freeinodes_counter, >> - ext3_count_free_inodes(sb)); >> - } >> - if (!err) { >> - err = percpu_counter_init(&sbi->s_dirs_counter, >> - ext3_count_dirs(sb)); >> - } >> - if (err) { >> - ext3_msg(sb, KERN_ERR, "error: insufficient memory"); >> - goto failed_mount3; >> - } >> - >> /* per fileystem reservation list head & lock */ >> spin_lock_init(&sbi->s_rsv_window_lock); >> sbi->s_rsv_window_root = RB_ROOT; >> @@ -1945,16 +1930,30 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) >> if (!test_opt(sb, NOLOAD) && >> EXT3_HAS_COMPAT_FEATURE(sb, EXT3_FEATURE_COMPAT_HAS_JOURNAL)) { >> if (ext3_load_journal(sb, es, journal_devnum)) >> - goto failed_mount3; >> + goto failed_mount2; >> } else if (journal_inum) { >> if (ext3_create_journal(sb, es, journal_inum)) >> - goto failed_mount3; >> + goto failed_mount2; >> } else { >> if (!silent) >> ext3_msg(sb, KERN_ERR, >> "error: no journal found. " >> "mounting ext3 over ext2?"); >> - goto failed_mount3; >> + goto failed_mount2; >> + } >> + err = percpu_counter_init(&sbi->s_freeblocks_counter, >> + ext3_count_free_blocks(sb)); >> + if (!err) { >> + err = percpu_counter_init(&sbi->s_freeinodes_counter, >> + ext3_count_free_inodes(sb)); >> + } >> + if (!err) { >> + err = percpu_counter_init(&sbi->s_dirs_counter, >> + ext3_count_dirs(sb)); >> + } >> + if (err) { >> + ext3_msg(sb, KERN_ERR, "error: insufficient memory"); >> + goto failed_mount4; >> } >> >> /* We have now updated the journal if required, so we can >> @@ -2040,11 +2039,10 @@ cantfind_ext3: >> goto failed_mount; >> >> failed_mount4: >> - journal_destroy(sbi->s_journal); >> -failed_mount3: >> percpu_counter_destroy(&sbi->s_freeblocks_counter); >> percpu_counter_destroy(&sbi->s_freeinodes_counter); >> percpu_counter_destroy(&sbi->s_dirs_counter); >> + journal_destroy(sbi->s_journal); >> failed_mount2: >> for (i = 0; i < db_count; i++) >> brelse(sbi->s_group_desc[i]); >> -- >> 1.6.6.1 >>
-- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 1/2] ext3: init statistics after journal recovery
, Dmitry Monakhov
, (Mon Apr 12, 12:12 pm)
[PATCH 2/2] ext4: init statistics after journal recovery v2
, Dmitry Monakhov
, (Mon Apr 12, 12:12 pm)
Re: [PATCH 1/2] ext3: init statistics after journal recovery
, Jan Kara
, (Mon Apr 12, 12:30 pm)
Re: [PATCH 1/2] ext3: init statistics after journal recovery
, Dmitry Monakhov
, (Mon Apr 12, 12:34 pm)
Re: [PATCH 2/2] ext4: init statistics after journal recove ...
, Jan Kara
, (Mon Apr 12, 12:37 pm)
[PATCH 1/2] ext3: init statistics after journal recovery v2
, Dmitry Monakhov
, (Mon Apr 12, 12:46 pm)
Re: [PATCH 1/2] ext3: init statistics after journal recove ...
, Jan Kara
, (Tue Apr 13, 7:26 am)
Re: [PATCH 2/2] ext4: init statistics after journal recove ...
, tytso
, (Wed Apr 21, 1:03 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Michael Trimarchi
Re: [PATCH] VFS: make file->f_pos access atomic on 32bit arch
Miklos Szeredi
[patch 14/15] vfs: more path_permission() conversions
Serge E. Hallyn
Re: [RFC v5][PATCH 7/8] Infrastructure for shared objects
Bernd Schmidt
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Takashi Iwai
[PATCH 2/2] input: Add LED support to Synaptics device
git
:
Junio C Hamano
Re: mingw, windows, crlf/lf, and git
Eyvind Bernhardsen
Re: Where has "git ls-remote" reference pattern matching gone?
Shawn O. Pearce
Re: Switching from CVS to GIT
Todd Zullinger
Re: [PATCH 2/2] send-email: rfc2047-quote subject lines with non-ascii characters
Santi Béjar
Re: How to use git-fmt-merge-msg?
linux-netdev
:
Ramkrishna Vepa
[net-2.6 PATCH 1/10] Neterion: New driver: Driver help file
Mark Anthony
invitation / inquiry
Ingo Molnar
Re: [PATCH 08/16] dma-debug: add core checking functions
David Miller
Re: [PATCH 1/3] f_phonet: dev_kfree_skb instead of dev_kfree_skb_any in TX callback
Sascha Hauer
[PATCH 03/12] fec: do not typedef struct types
git-commits-head
:
Linux Kernel Mailing List
amba: struct device - replace bus_id with dev_name(), dev_set_name()
Linux Kernel Mailing List
MIPS: Yosemite: Convert SMP startup lock to arch spinlock.
Linux Kernel Mailing List
ARM: S5PC100: IRQ and timer
Linux Kernel Mailing List
davinci: edma: clear interrupt status for interrupt enabled channels only
Linux Kernel Mailing List
x86, mm, kprobes: fault.c, simplify notify_page_fault()
openbsd-misc
:
Daniel A. Ramaley
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Matthias Kilian
Re: can't get vesa @ 1280x800 or nv
Tobias Ulmer
Re: Problem after upgrade 4.5 to 4.6: ERR M
Philip Guenther
Re: SIGCHLD and libpthread.so
J.C. Roberts
Re: [semi-OT] Can anyone recommend an OpenBSD-compatible colour laser printer?
Colocation donated by:
Syndicate