On Fri, Oct 25, 2019 at 05:40:28AM -0700, Christoph Hellwig wrote: > > + error = xfs_btree_count_blocks(cur, &btblocks); > > + xfs_btree_del_cursor(cur, error); > > + if (error) > > + return error; > > + > > + *count += btblocks - 1; > > Can you throw in a comment explaining the -1 here? Without doing > extra research I can't think of a reason why it would be there. /* * xfs_btree_count_blocks includes the root block contained in the inode * fork, so subtract one for the count of allocated disk blocks. */ Will do. > > + /* fall through */ > > + case XFS_DINODE_FMT_EXTENTS: > > + *nextents = xfs_bmap_count_leaves(ifp, count); > > return 0; > > I don't think you need the return statement here as there is a return 0 > just below it. Ok. --D