From fe8a7982ca90c3c9b8a09ec33f032527d7034a7b Mon Sep 17 00:00:00 2001 From: Tomohiro Kusumi Date: Tue, 14 Aug 2018 05:33:47 +0900 Subject: [PATCH] Fix comment on calculating blkid Fix comment on calculating blkid at level n within dnode's blkptrs. "(2^(level*(indblkshift - SPA_BLKPTRSHIFT)" is part of divisor in this division. Reviewed-by: Brian Behlendorf Signed-off-by: Tomohiro Kusumi Closes #7768 --- module/zfs/dbuf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/dbuf.c b/module/zfs/dbuf.c index 2724f3aa2..f0bee6c2b 100644 --- a/module/zfs/dbuf.c +++ b/module/zfs/dbuf.c @@ -1152,7 +1152,7 @@ dbuf_whichblock(const dnode_t *dn, const int64_t level, const uint64_t offset) * 2^(level*(indblkshift - SPA_BLKPTRSHIFT)). * * Thus, the level n blkid is: offset / - * ((2^datablkshift)*(2^(level*(indblkshift - SPA_BLKPTRSHIFT))) + * ((2^datablkshift)*(2^(level*(indblkshift-SPA_BLKPTRSHIFT)))) * = offset / 2^(datablkshift + level * * (indblkshift - SPA_BLKPTRSHIFT)) * = offset >> (datablkshift + level *