| To: | "Christoph Hellwig" <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | RE: [PATCH 14/14] repair: add missing locking in scanfunc_bmap |
| From: | "Alex Elder" <aelder@xxxxxxx> |
| Date: | Thu, 22 Oct 2009 11:42:46 -0500 |
| Cc: | "Barry Naujok" <bnaujok@xxxxxxx>, <xfs@xxxxxxxxxxx> |
| In-reply-to: | <20090902175842.262611292@xxxxxxxxxxxxxxxxxxxxxx> |
| Thread-index: | Acor+Q+SXYCQVOtZS7ebk2uJgdhJcAnPYyLQ |
| Thread-topic: | [PATCH 14/14] repair: add missing locking in scanfunc_bmap |
Christoph Hellwig wrote:
> Make sure to protect access to the block usage tracking btree with
> the ag_lock.
Well that one was easy. Looks good. -Alex
> Signed-off-by: Barry Naujok <bnaujok@xxxxxxx>
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
Reviewed-by: Alex Elder <aelder@xxxxxxx>
> Index: xfsprogs-dev/repair/scan.c
> ===================================================================
> --- xfsprogs-dev.orig/repair/scan.c 2009-08-20 03:16:13.000000000 +0000
> +++ xfsprogs-dev/repair/scan.c 2009-08-20 03:18:17.000000000 +0000
> @@ -235,6 +235,7 @@
> agno = XFS_FSB_TO_AGNO(mp, bno);
> agbno = XFS_FSB_TO_AGBNO(mp, bno);
>
> + pthread_mutex_lock(&ag_locks[agno]);
> state = get_bmap(agno, agbno);
> switch (state) {
> case XR_E_UNKNOWN:
> @@ -280,6 +281,7 @@
> state, ino, (__uint64_t) bno);
> break;
> }
> + pthread_mutex_unlock(&ag_locks[agno]);
> } else {
> /*
> * attribute fork for realtime files is in the regular
>
> _______________________________________________
> xfs mailing list
> xfs@xxxxxxxxxxx
> http://oss.sgi.com/mailman/listinfo/xfs
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | RE: [PATCH 13/14] repair: optimize duplicate extent tracking, Alex Elder |
|---|---|
| Next by Date: | [PATCH 1/2] add lpath_to_handle to libhandle, Bill Kendall |
| Previous by Thread: | RE: [PATCH 13/14] repair: optimize duplicate extent tracking, Alex Elder |
| Next by Thread: | [PATCH 1/2] add lpath_to_handle to libhandle, Bill Kendall |
| Indexes: | [Date] [Thread] [Top] [All Lists] |