| To: | Lukas Czerner <lczerner@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 2/4] fs: Prevent doing FALLOC_FL_ZERO_RANGE on append only file |
| From: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
| Date: | Sat, 12 Apr 2014 08:19:35 -0700 |
| Cc: | linux-fsdevel@xxxxxxxxxxxxxxx, ceph-devel@xxxxxxxxxxxxxxx, linux-ext4@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <1397242665-2183-2-git-send-email-lczerner@xxxxxxxxxx> |
| References: | <1397242665-2183-1-git-send-email-lczerner@xxxxxxxxxx> <1397242665-2183-2-git-send-email-lczerner@xxxxxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Fri, Apr 11, 2014 at 08:57:43PM +0200, Lukas Czerner wrote: > /* > - * It's not possible to punch hole or perform collapse range > - * on append only file > + * It's not possible to punch hole, perform collapse range > + * or zero range on append only file > */ > - if (mode & (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_COLLAPSE_RANGE) > + if (mode & (FALLOC_FL_PUNCH_HOLE | FALLOC_FL_COLLAPSE_RANGE | > + FALLOC_FL_ZERO_RANGE) Might be better to make this a negative test fo the operation that is allowed on an appen only file. That's also much better future proof. |
| Previous by Date: | Re: [PATCH 4/4] fs: Disallow all fallocate operation on active swapfile, Theodore Ts'o |
|---|---|
| Next by Date: | Re: [PATCH 3/4] fs: Remove i_size check from do_fallocate, Christoph Hellwig |
| Previous by Thread: | Re: [PATCH 2/4] fs: Prevent doing FALLOC_FL_ZERO_RANGE on append only file, Theodore Ts'o |
| Next by Thread: | Re: [PATCH 2/4] fs: Prevent doing FALLOC_FL_ZERO_RANGE on append only file, Lukáš Czerner |
| Indexes: | [Date] [Thread] [Top] [All Lists] |