Whamcloud - gitweb
LU-16480 lov: fiemap improperly handles fm_extent_count=0 08/52308/2
authorAndrew Perepechko <andrew.perepechko@hpe.com>
Mon, 16 Jan 2023 13:13:34 +0000 (08:13 -0500)
committerOleg Drokin <green@whamcloud.com>
Sun, 16 Jun 2024 03:35:44 +0000 (03:35 +0000)
commitf8b92476350115e85efe77be8711d25b6a0ec9f7
tree6f72511e735dd0bfd8b0ba98dd3318243aae7fb1
parent0874806fece969f45890427a5269341016d824fd
LU-16480 lov: fiemap improperly handles fm_extent_count=0

FIEMAP calls with fm_extent_count=0 are supposed only to
return the number of extents.

lov_object_fiemap() attempts to initialize stripe_last
based on fiemap->fm_extents[0] which is not initialized
in userspace and not even allocated in kernelspace.

Eventually, the call exits with -EINVAL and "FIEMAP does
not init start entry" kernel log message.

Lustre-change: https://review.whamcloud.com/49645
Lustre-commit: 829af7b029d8e4e391b93792bf5214611b0193bd

Fixes: 409719608c ("LU-11848 lov: FIEMAP support for PFL and FLR file")
Signed-off-by: Andrew Perepechko <andrew.perepechko@hpe.com>
Change-Id: I65e706b5dd5c8a6db90a539c2602af839b4da823
HPE-bug-id: LUS-11443
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Alexander Boyko <alexander.boyko@hpe.com>
Signed-off-by: Etienne AUJAMES <eaujames@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/52308
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/lov/lov_object.c