[PATCH 00/10] xfs: LARP - clean up xfs_attr_set_iter state machine

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Allison,

This is first patchset for fixing up stuff in the LARP code. I've
based this on my current 5.19-compose branch here:

git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git xfs-5.19-compose

The first patch in the series fixes the splat that occurs in
generic/642 in that merge from the empty, dirty transaction. I
haven't touched the xfs_attri_finish_one() code to remove the
XFS_TRANS_DIRTY there because that code is used for the remove path,
too, and I didn't want to perturb that before I was finished with
the set path.

The rest of the patchset is cleaning up the xfs_attr_set_iter()
state machine. THe use of XFS_DAS_UNINIT is gone - instead I set the
initial state according to the format of the attr fork. Then if we
convert from sf to leaf, or leaf to node, we bump the state to
LEAF_ADD or NODE_ADD and roll the transaction. The next time in it
will perform the appropriate attr addition.

I've then added extra states to handle remote value block allocation
and setting of the value for the leaf blocks. This makes the code
the same as setting the remote value for node blocks, and that then
leads to collapsing all the duplicate code paths.

To do that, I set up the leaf and node states as identical
numerically ascending sequences, allowing state changes to be done
by incrementing the state value from a specific initial condition,
but progressing down the correct sequence of states even though they
are executing the same code path. This initial condition (leaf or
node) is set directly by the LEAF/NODE_ADD states that have already
been separated and set up.


[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux