EX-7601 ldiskfs: fix detection of compressed extent
The code in ldiskfs_map_inode_pages which detects a
compressed extent checks the first lnb for that extent, but
it's possible for some lnbs and not others to be compressed
in a given extent, so we must check all of them. This
occurs when multiple writes have been combined in to one
RPC.
If we don't detect compression correctly, we won't set the
file size correctly and we'll get data corruption.
Fixes:
b489a2a397 ("EX-7600 osc: save compressed object size")
Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I11d50bdc45c40d93bb1b829fcd930165b7626432
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/53588
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Artem Blagodarenko <ablagodarenko@ddn.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>