Whamcloud - gitweb
LU-16808 lfs: lfs find --printf won't hang on special files 05/50905/6
authorBobi Jam <bobijam@whamcloud.com>
Wed, 10 May 2023 05:11:47 +0000 (13:11 +0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 20 Jun 2023 03:42:10 +0000 (03:42 +0000)
commitf47f816a5b1deabc1d501332a1a30af205d22515
tree0ff3c503efba4ecf890c1d498d1906bd58fadd86
parent2d2a83f1445391c90bfc94327f825fd17ee9a00b
LU-16808 lfs: lfs find --printf won't hang on special files

Add O_NONBLOCK flag on opening special files lest it hang.

Since '--printf' requires gather_all, and in check_projid case and
gather_all case, it open the special file and try to get project id
from it, we shouldn't error out on only gather_all case.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: Ic2afff7bbccf73ff94c64c62799f9b37b18d10a1
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/50905
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Thomas Bertschinger <bertschinger@lanl.gov>
lustre/tests/sanity.sh
lustre/utils/liblustreapi.c