X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fllite%2Ffile.c;h=2e78b2d53ff19713ccd99468a740d6ad9d8aead6;hp=2da3896fe2dd18111070ccfcb965f825f06ab733;hb=71a9f5a466bfa46436535e3173d1fed37ca12aea;hpb=98b7df0be162581a143bfd4e60ac921b5d0b7394 diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 2da3896..2e78b2d 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -5083,6 +5083,14 @@ long ll_fallocate(struct file *filp, int mode, loff_t offset, loff_t len) ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_FALLOCATE, 1); rc = cl_falloc(inode, mode, offset, len); + /* + * ENOTSUPP (524) is an NFSv3 specific error code erroneously + * used by Lustre in several places. Retuning it here would + * confuse applications that explicity test for EOPNOTSUPP + * (95) and fall back to ftruncate(). + */ + if (rc == -ENOTSUPP) + rc = -EOPNOTSUPP; RETURN(rc); }