Re: [PATCH 01/25] xfs: allow null firstblock in xfs_bmapi_write() when tp is null

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

 



On Tue, Jul 03, 2018 at 01:22:55PM -0400, Brian Foster wrote:
> xfs_bmapi_write() always expects a valid firstblock pointer. It
> immediately dereferences the pointer to help determine how to
> initialize the bma.minleft field. The remaining accesses are
> related to modifying btree format forks, which is only relevant for
> !COW fork callers.
> 
> The reflink code passes a NULL transaction to xfs_bmapi_write() in a
> couple places that do COW fork unwritten conversion. The purpose of
> the firstblock field is to track the first block allocation in the
> current transaction, so technically firstblock should not be
> required for these callers either.
> 
> Tweak xfs_bmapi_write() to initialize the bma correctly without
> accessing the firstblock pointer if no transaction is provided in
> the first place. Update the reflink callers to pass NULL instead of
> otherwise unused firstblock references.
> 
> Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>

Looks good,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[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