xfs: report crtime and attribute flags to statx

statx has the ability to report inode creation times and inode flags, so
hook up di_crtime and di_flags to that functionality.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

authored by Darrick J. Wong and committed by Al Viro 5f955f26 99652ea5

+14
+14
fs/xfs/xfs_iops.c
··· 516 stat->blocks = 517 XFS_FSB_TO_BB(mp, ip->i_d.di_nblocks + ip->i_delayed_blks); 518 519 520 switch (inode->i_mode & S_IFMT) { 521 case S_IFBLK:
··· 516 stat->blocks = 517 XFS_FSB_TO_BB(mp, ip->i_d.di_nblocks + ip->i_delayed_blks); 518 519 + if (ip->i_d.di_version == 3) { 520 + if (request_mask & STATX_BTIME) { 521 + stat->result_mask |= STATX_BTIME; 522 + stat->btime.tv_sec = ip->i_d.di_crtime.t_sec; 523 + stat->btime.tv_nsec = ip->i_d.di_crtime.t_nsec; 524 + } 525 + } 526 + 527 + if (ip->i_d.di_flags & XFS_DIFLAG_IMMUTABLE) 528 + stat->attributes |= STATX_ATTR_IMMUTABLE; 529 + if (ip->i_d.di_flags & XFS_DIFLAG_APPEND) 530 + stat->attributes |= STATX_ATTR_APPEND; 531 + if (ip->i_d.di_flags & XFS_DIFLAG_NODUMP) 532 + stat->attributes |= STATX_ATTR_NODUMP; 533 534 switch (inode->i_mode & S_IFMT) { 535 case S_IFBLK: