Whamcloud - gitweb
EX-7389 pcc: open file for detach O_RDONLY
authorPatrick Farrell <pfarrell@whamcloud.com>
Tue, 9 May 2023 17:53:23 +0000 (13:53 -0400)
committerAndreas Dilger <adilger@whamcloud.com>
Thu, 11 May 2023 00:41:59 +0000 (00:41 +0000)
commitb175a0cac37fc9c398e6898664362112b818e226
treeda08d1cef6ded284239db0bf4c08ac0e385f7991
parent659495cb58f2eeb29784a37dcb1df7b5868708e4
EX-7389 pcc: open file for detach O_RDONLY

llapi_pcc_detach_file is rdwr, but should just be rdonly.
This means files can be attached but not detached if the
client is mounted rdonly.

The fix is just to open the file in detach with O_RDONLY.

Signed-off-by: Patrick Farrell <pfarrell@whamcloud.com>
Change-Id: I3e289ab52ff760a8ab84a209b968109517953b52
Reviewed-on: https://review.whamcloud.com/c/ex/lustre-release/+/50749
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
lustre/tests/sanity-pcc.sh
lustre/utils/liblustreapi_pcc.c