xfs
[Top] [All Lists]

[PATCH 01/48] mkfs: fix realtime device initialisation

To: xfs@xxxxxxxxxxx
Subject: [PATCH 01/48] mkfs: fix realtime device initialisation
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Fri, 7 Jun 2013 10:25:24 +1000
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1370564771-4929-1-git-send-email-david@xxxxxxxxxxxxx>
References: <1370564771-4929-1-git-send-email-david@xxxxxxxxxxxxx>
From: Dave Chinner <dchinner@xxxxxxxxxx>

The method that libxfs uses for logging inodes is not followed by rtinit().
It fails to join the realtime bitmap inode to the final extent free
transactions, and so mkfs.xfs dies when trying to log changes to the bitmap
inode. Fix it.

Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx>
---
 mkfs/proto.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/mkfs/proto.c b/mkfs/proto.c
index 56eed31..f201096 100644
--- a/mkfs/proto.c
+++ b/mkfs/proto.c
@@ -733,6 +733,8 @@ rtinit(
                tp = libxfs_trans_alloc(mp, 0);
                if ((i = libxfs_trans_reserve(tp, 0, 0, 0, 0, 0)))
                        res_failed(i);
+               libxfs_trans_ijoin(tp, rbmip, 0);
+               libxfs_trans_ihold(tp, rbmip);
                xfs_bmap_init(&flist, &first);
                ebno = XFS_RTMIN(mp->m_sb.sb_rextents,
                        bno + NBBY * mp->m_sb.sb_blocksize);
-- 
1.7.10.4

<Prev in Thread] Current Thread [Next in Thread>