On 4/12/17 1:07 AM, Darrick J. Wong wrote: > On Tue, Apr 11, 2017 at 10:54:15PM -0500, Eric Sandeen wrote: >> 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; > > Extra spaces. yeah, derp. >> + >> + if (t->typnm == TYP_INODE) >> + iocur_top->ino_buf = 1; >> + else if (t->typnm == TYP_DQBLK) >> + iocur_top->dquot_buf = 1; > > iocur_top->dquot_buf = (t->typnm == TYP_DQBLK); ? *shrug* sure. I'm not actually sure this patch is quite right, though, I think it's a band-aid. Will think about it some more. Thanks, -Eric > --D > >> >> /* 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 > -- 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