public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@sun.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: ext4 development <linux-ext4@vger.kernel.org>
Subject: Re: [PATCH, RFC] properly lock group descriptors before	initializing
Date: Wed, 16 Jul 2008 03:03:42 -0600	[thread overview]
Message-ID: <20080716090342.GQ6239@webber.adilger.int> (raw)
In-Reply-To: <487D8671.2080307@redhat.com>

On Jul 16, 2008  00:26 -0500, Eric Sandeen wrote:
> @@ -105,6 +105,7 @@ read_inode_bitmap(struct super_block *sb
>  	desc = ext4_get_group_desc(sb, block_group, NULL);
>  	if (!desc)
>  		goto error_out;
> +	spin_lock(sb_bgl_lock(EXT4_SB(sb), block_group));
>  	if (desc->bg_flags & cpu_to_le16(EXT4_BG_INODE_UNINIT)) {
>  		bh = sb_getblk(sb, ext4_inode_bitmap(sb, desc));
>  		if (!buffer_uptodate(bh)) {

sb_getblk() calls __getblk(), which is might_sleep() so is a no-no.

> @@ -119,6 +120,7 @@ read_inode_bitmap(struct super_block *sb
>  	} else {
>  		bh = sb_bread(sb, ext4_inode_bitmap(sb, desc));
>  	}
> +	spin_unlock(sb_bgl_lock(EXT4_SB(sb), block_group));

Likewise "sb_bread" is doing disk access.  I guess you don't have
CONFIG_DEBUG_SPINLOCK_SLEEP enabled in your kernel.

Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.


      parent reply	other threads:[~2008-07-16  9:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16  5:26 [PATCH, RFC] properly lock group descriptors before initializing Eric Sandeen
2008-07-16  5:36 ` Eric Sandeen
2008-07-16  9:03 ` Andreas Dilger [this message]

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=20080716090342.GQ6239@webber.adilger.int \
    --to=adilger@sun.com \
    --cc=linux-ext4@vger.kernel.org \
    --cc=sandeen@redhat.com \
    /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