cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Wendy Cheng <wcheng@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [PATCH 4 of 5] Bz #248176: GFS2: invalid metadata block - REVISED
Date: Thu, 09 Aug 2007 09:51:01 -0400	[thread overview]
Message-ID: <46BB1BC5.1020701@redhat.com> (raw)
In-Reply-To: <46BB1AC4.9030509@redhat.com>

Sorry ... hand and head do not coordinate well. Somehow I use "spin 
lock" but it is actually a semaphore.... Wendy
> Bob Peterson wrote:
>> Part of the problem was that inodes were being recycled
>> before their buffers were flushed to the journal logs.
>>
>>   
> Set aside "after this patch, the problem goes away" thing ...
>
> I haven't checked previous three patches yet so I may not have the 
> overall picture ... but why adding the journal flush spin lock here 
> could prevent the new inode to get re-used before its associated 
> buffer are flushed to the logs ? Could you elaborate more ?
>
>> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
>> index b93ac45..2d7f7ea 100644
>> --- a/fs/gfs2/rgrp.c
>> +++ b/fs/gfs2/rgrp.c
>> @@ -865,12 +865,15 @@ static struct inode *try_rgrp_unlink(struct 
>> gfs2_rgrpd *rgd, u64 *last_unlinked)
>>      struct inode *inode;
>>      u32 goal = 0, block;
>>      u64 no_addr;
>> +    struct gfs2_sbd *sdp = rgd->rd_sbd;
>>  
>>      for(;;) {
>>          if (goal >= rgd->rd_data)
>>              break;
>> +        down_write(&sdp->sd_log_flush_lock);
>>          block = rgblk_search(rgd, goal, GFS2_BLKST_UNLINKED,
>>                       GFS2_BLKST_UNLINKED);
>> +        up_write(&sdp->sd_log_flush_lock);
>>          if (block == BFITNOENT)
>>              break;
>>         
> My concern is that GFS2's usage of sd_log_flush_lock has been very 
> abused lately. The journal logic is gradually becoming difficult to 
> understand and maintain. With this change, we move a local spin lock 
> (that belongs to log.c) into another sub-component (rgrp). 
> Intuitively, this is not right.
>
> -- Wendy
>
>



  reply	other threads:[~2007-08-09 13:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-08 21:52 [Cluster-devel] [PATCH 4 of 5] Bz #248176: GFS2: invalid metadata block - REVISED Bob Peterson
2007-08-09 13:46 ` Wendy Cheng
2007-08-09 13:51   ` Wendy Cheng [this message]
2007-08-09 15:37   ` Bob Peterson
2007-08-09 18:21     ` Wendy Cheng
2007-08-10  8:26       ` Steven Whitehouse
2007-08-10 13:12         ` Wendy Cheng
2007-08-10 13:04           ` Steven Whitehouse

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=46BB1BC5.1020701@redhat.com \
    --to=wcheng@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;
as well as URLs for NNTP newsgroup(s).