linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaswinder Singh Rajput <jaswinderlinux@gmail.com>
To: Jan Blunck <jblunck@suse.de>
Cc: Jan Kara <jack@suse.cz>,
	tytso@mit.edu,
	Linux-Kernel Mailinglist <linux-kernel@vger.kernel.org>,
	linux-ext4@vger.kernel.org,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>, Andi Kleen <andi@firstfloor.org>,
	OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
Subject: Re: [PATCH 5/5] ext2: Add ext2_sb_info s_lock spinlock
Date: Wed, 14 Apr 2010 12:40:28 +0530	[thread overview]
Message-ID: <o2r3f9a31f41004140010t7c553e39ib51e69fa9022a75f@mail.gmail.com> (raw)
In-Reply-To: <1271104905-8804-6-git-send-email-jblunck@suse.de>

Hello,

On Tue, Apr 13, 2010 at 2:11 AM, Jan Blunck <jblunck@suse.de> wrote:
> Add a spinlock that protects against concurrent modifications of
> s_mount_state, s_blocks_last, s_overhead_last and the content of the
> superblock's buffer pointed to by sbi->s_es. This is a preparation patch
> for removing the BKL from ext2 in the next patch.
>
> Signed-off-by: Jan Blunck <jblunck@suse.de>
> Cc: Andi Kleen <andi@firstfloor.org>
> Cc: Jan Kara <jack@suse.cz>
> Cc: OGAWA Hirofumi <hirofumi@mail.parknet.co.jp>
> ---
>  fs/ext2/inode.c            |    2 ++
>  fs/ext2/super.c            |   31 +++++++++++++++++++++++++++++--
>  include/linux/ext2_fs_sb.h |    6 ++++++
>  3 files changed, 37 insertions(+), 2 deletions(-)
>
> diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c
> index fc13cc1..5d15442 100644
> --- a/fs/ext2/inode.c
> +++ b/fs/ext2/inode.c
> @@ -1407,9 +1407,11 @@ static int __ext2_write_inode(struct inode *inode, int do_sync)
>                                * created, add a flag to the superblock.
>                                */
>                                lock_kernel();
> +                               spin_lock(&EXT2_SB(sb)->s_lock);
>                                ext2_update_dynamic_rev(sb);
>                                EXT2_SET_RO_COMPAT_FEATURE(sb,
>                                        EXT2_FEATURE_RO_COMPAT_LARGE_FILE);
> +                               spin_unlock(&EXT2_SB(sb)->s_lock);
>                                unlock_kernel();
>                                ext2_write_super(sb);

Do we need both locks (kernel lock and spin lock)

Thanks,
--
JSR
--
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

  parent reply	other threads:[~2010-04-14  7:10 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-12 20:41 [PATCH 0/5] ext2: Preparation to remove BKL Jan Blunck
2010-04-12 20:41 ` [PATCH 1/5] ext2: Use ext2_clear_super_error() in ext2_sync_fs() Jan Blunck
2010-04-12 20:41 ` [PATCH 2/5] ext2: Set the write time " Jan Blunck
2010-04-12 20:41 ` [PATCH 3/5] ext2: Remove duplicate code from ext2_sync_fs() Jan Blunck
2010-04-12 20:41 ` [PATCH 4/5] ext2: Move ext2_write_super() out of ext2_setup_super() Jan Blunck
2010-04-13 17:53   ` Jan Kara
2010-04-14  7:55     ` Jan Blunck
2010-04-12 20:41 ` [PATCH 5/5] ext2: Add ext2_sb_info s_lock spinlock Jan Blunck
2010-04-13 19:09   ` Jan Kara
2010-04-14  8:19     ` Jan Blunck
2010-04-14  7:10   ` Jaswinder Singh Rajput [this message]
2010-04-14  8:00     ` Jan Blunck
2010-04-12 21:01 ` [PATCH 0/5] ext2: Preparation to remove BKL Frederic Weisbecker
2010-04-13  9:31   ` Arnd Bergmann
2010-04-13 20:12     ` Frederic Weisbecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=o2r3f9a31f41004140010t7c553e39ib51e69fa9022a75f@mail.gmail.com \
    --to=jaswinderlinux@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=arnd@arndb.de \
    --cc=fweisbec@gmail.com \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=jack@suse.cz \
    --cc=jblunck@suse.de \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).