xfs: move the fork format fields into struct xfs_ifork
Both the data and attr fork have a format that is stored in the legacy idinode. Move it into the xfs_ifork structure instead, where it uses up padding. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Chandan Babu R <chandanrlinux@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:

committed by
Darrick J. Wong

parent
daf83964a3
commit
f7e67b20ec
@@ -36,7 +36,7 @@ xfs_inode_item_data_fork_size(
|
||||
{
|
||||
struct xfs_inode *ip = iip->ili_inode;
|
||||
|
||||
switch (ip->i_d.di_format) {
|
||||
switch (ip->i_df.if_format) {
|
||||
case XFS_DINODE_FMT_EXTENTS:
|
||||
if ((iip->ili_fields & XFS_ILOG_DEXT) &&
|
||||
ip->i_df.if_nextents > 0 &&
|
||||
@@ -77,7 +77,7 @@ xfs_inode_item_attr_fork_size(
|
||||
{
|
||||
struct xfs_inode *ip = iip->ili_inode;
|
||||
|
||||
switch (ip->i_d.di_aformat) {
|
||||
switch (ip->i_afp->if_format) {
|
||||
case XFS_DINODE_FMT_EXTENTS:
|
||||
if ((iip->ili_fields & XFS_ILOG_AEXT) &&
|
||||
ip->i_afp->if_nextents > 0 &&
|
||||
@@ -142,7 +142,7 @@ xfs_inode_item_format_data_fork(
|
||||
struct xfs_inode *ip = iip->ili_inode;
|
||||
size_t data_bytes;
|
||||
|
||||
switch (ip->i_d.di_format) {
|
||||
switch (ip->i_df.if_format) {
|
||||
case XFS_DINODE_FMT_EXTENTS:
|
||||
iip->ili_fields &=
|
||||
~(XFS_ILOG_DDATA | XFS_ILOG_DBROOT | XFS_ILOG_DEV);
|
||||
@@ -227,7 +227,7 @@ xfs_inode_item_format_attr_fork(
|
||||
struct xfs_inode *ip = iip->ili_inode;
|
||||
size_t data_bytes;
|
||||
|
||||
switch (ip->i_d.di_aformat) {
|
||||
switch (ip->i_afp->if_format) {
|
||||
case XFS_DINODE_FMT_EXTENTS:
|
||||
iip->ili_fields &=
|
||||
~(XFS_ILOG_ADATA | XFS_ILOG_ABROOT);
|
||||
@@ -305,7 +305,7 @@ xfs_inode_to_log_dinode(
|
||||
struct inode *inode = VFS_I(ip);
|
||||
|
||||
to->di_magic = XFS_DINODE_MAGIC;
|
||||
to->di_format = from->di_format;
|
||||
to->di_format = xfs_ifork_format(&ip->i_df);
|
||||
to->di_uid = i_uid_read(inode);
|
||||
to->di_gid = i_gid_read(inode);
|
||||
to->di_projid_lo = from->di_projid & 0xffff;
|
||||
@@ -329,7 +329,7 @@ xfs_inode_to_log_dinode(
|
||||
to->di_nextents = xfs_ifork_nextents(&ip->i_df);
|
||||
to->di_anextents = xfs_ifork_nextents(ip->i_afp);
|
||||
to->di_forkoff = from->di_forkoff;
|
||||
to->di_aformat = from->di_aformat;
|
||||
to->di_aformat = xfs_ifork_format(ip->i_afp);
|
||||
to->di_dmevmask = from->di_dmevmask;
|
||||
to->di_dmstate = from->di_dmstate;
|
||||
to->di_flags = from->di_flags;
|
||||
|
Reference in New Issue
Block a user