Comments

This ioctl gets the information of all inode PAs in the target inode.
The interface of this ioctl is like FS_IOC_FIEMAP. If we call this ioctl, we
get the array of struct ext4_prealloc_info that stores the information of inode
PA.
INTERFACE
-----------
#define EXT4_IOC_GET_PA _IOWR('f', 17, struct ext4_prealloc_list)
struct ext4_prealloc_list {
__u32 pl_count; /* size of pl_space array (in) */
__u32 pl_mapped; /* number of PAs that were mapped (out) */
__u32 pl_entries; /* number of PAs the inode has (out) */
struct ext4_prealloc_info pl_space[0]; /* array of mapped PAs (out) */
};
pl_count specifies the number of elements in the pl_space[] array that can be
used to return inode PAs. If pl_count is zero, no inode PAs will be returned.
Moreover, if pl_count is set the value that is better than the number of
elements in the pl_space array, this ioctl returns EFAULT.
pl_mapped shows the number of getting inode PAs, and pl_entries shows the
number of inode PAs in the target inode. You can confirm that we could get all
inode PAs in the target inode by comparison with pl_mapped and pl_entries.
Signed-off-by: Kazuya Mio <k-mio@sx.jp.nec.com>Signed-off-by: Akira Fujita <a-fujita@rs.jp.nec.com>
---
fs/ext4/ext4.h | 11 +++++++++++
fs/ext4/ioctl.c | 33 +++++++++++++++++++++++++++++++++
fs/ext4/mballoc.c | 44 ++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 88 insertions(+)
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html