Bug fixes for 6.6-rc3:

 * Fix an integer overflow bug when processing an fsmap call.

 * Fix crash due to CPU hot remove event racing with filesystem mount
   operation.

 * During read-only mount, XFS does not allow the contents of the log to be
   recovered when there are one or more unrecognized rcompat features in the
   primary superblock, since the log might have intent items which the kernel
   does not know how to process.

 * During recovery of log intent items, XFS now reserves log space sufficient
   for one cycle of a permanent transaction to execute. Otherwise, this could
   lead to livelocks due to non-availability of log space.

 * On an fs which has an ondisk unlinked inode list, trying to delete a file
   or allocating an O_TMPFILE file can cause the fs to the shutdown if the
   first inode in the ondisk inode list is not present in the inode cache.
   The bug is solved by explicitly loading the first inode in the ondisk
   unlinked inode list into the inode cache if it is not already cached.

   A similar problem arises when the uncached inode is present in the middle
   of the ondisk unlinked inode list. This second bug is triggered when
   executing operations like quotacheck and bulkstat. In this case, XFS now
   reads in the entire ondisk unlinked inode list.

 * Enable LARP mode only on recent v5 filesystems.

 * Fix a out of bounds memory access in scrub.

 * Fix a performance bug when locating the tail of the log during mounting a
   filesystem.

Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
xfs: use roundup_pow_of_two instead of ffs during xlog_find_tail

In our production environment, we find that mounting a 500M /boot
which is umount cleanly needs ~6s. One cause is that ffs() is
used by xlog_write_log_records() to decide the buffer size. It
can cause a lot of small IO easily when xlog_clear_stale_blocks()
needs to wrap around the end of log area and log head block is
not power of two. Things are similar in xlog_find_verify_cycle().

The code is able to handed bigger buffer very well, we can use
roundup_pow_of_two() to replace ffs() directly to avoid small
and sychronous IOs.

Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Wang Jianchao <wangjc136@midea.com>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
1 file changed