}
run_test 56eb "check lfs getstripe on symlink"
+test_56ebb() {
+
+ mkdir $DIR/$tdir
+ mkfifo $DIR/$tdir/$tfile-fifo
+ $LFS getdirstripe -r $DIR/$tdir || error "$LFS getdirstripe -r: $DIR"
+}
+run_test 56ebb "check $LFS getdirstripe for FIFO file"
+
test_56ec() {
[[ $OSTCOUNT -lt 2 ]] && skip_env "needs >= 2 OSTs"
local dir=$DIR/$tdir
*/
if (ret < 0 && errno == ENOTTY && !did_nofollow) {
int fd, ret2;
+ struct stat st;
did_nofollow = true;
- fd = open(path, O_RDONLY | O_NOFOLLOW);
+ if (stat(path, &st) != 0)
+ return -errno;
+ if (S_ISFIFO(st.st_mode))
+ fd = open(path, O_RDONLY | O_NOFOLLOW | O_NONBLOCK);
+ else
+ fd = open(path, O_RDONLY | O_NOFOLLOW);
if (fd < 0) {
/* restore original errno */
errno = ENOTTY;
struct find_param *param = (struct find_param *)data;
int d = dp == NULL ? -1 : *dp, fd = -1;
int ret = 0;
+ struct stat st;
if (p == -1 && d == -1)
return -EINVAL;
if (param->fp_no_follow)
flag = O_RDONLY | O_NOFOLLOW;
+ if (stat(path, &st) != 0)
+ return -errno;
+ if (S_ISFIFO(st.st_mode))
+ flag |= O_NONBLOCK;
+
fd = open(path, flag);
if (fd == -1)