[PATCH] xfs_db: set buf flag for inode or dqblk with "type"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Currently, setting "type" to inode or dqblk does not
appropriately set the buffer type flags for these
types.  i.e.:

xfs_db> inode 128

sets ino_buf, but

xfs_db> convert inode 128 fsblock
0x10 (16)
xfs_db> fsblock 16
xfs_db> type inode

does not.  This is apparent if we try to use "type" to
switch to an inode or dqblk, then try to use "write -d"
which tests these flags.

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---

diff --git a/db/io.c b/db/io.c
index 9918a51..d78fc66 100644
--- a/db/io.c
+++ b/db/io.c
@@ -617,6 +617,13 @@ set_iocur_type(
 	struct xfs_buf	*bp = iocur_top->bp;
 
 	iocur_top->typ = t;
+	iocur_top->ino_buf = 0;
+	iocur_top->dquot_buf  = 0;
+
+	if (t->typnm == TYP_INODE)
+		iocur_top->ino_buf = 1;
+	else if (t->typnm == TYP_DQBLK)
+		iocur_top->dquot_buf = 1;
 
 	/* verify the buffer if the type has one. */
 	if (!bp)


--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux