]> git.karo-electronics.de Git - linux-beck.git/commit
xfs: provide helper for counting extents from if_bytes
authorEric Sandeen <sandeen@sandeen.net>
Mon, 9 Jan 2017 15:38:36 +0000 (16:38 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jan 2017 10:39:39 +0000 (11:39 +0100)
commitf380ee72a7a498c934afe3aa67a50242b935f540
tree23140340a4458debfddad4051a53f30ec98c2114
parent3978c5bb004312fd267aed7279fe64b119e126b0
xfs: provide helper for counting extents from if_bytes

commit 5d829300bee000980a09ac2ccb761cb25867b67c upstream.

The open-coded pattern:

ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t)

is all over the xfs code; provide a new helper
xfs_iext_count(ifp) to count the number of inline extents
in an inode fork.

[dchinner: pick up several missed conversions]

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/libxfs/xfs_bmap.c
fs/xfs/libxfs/xfs_inode_fork.c
fs/xfs/libxfs/xfs_inode_fork.h
fs/xfs/xfs_bmap_util.c
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_qm.c
fs/xfs/xfs_reflink.c