Re: [PATCH][PROGS] xfs_io: Allow setting multiple mode flags for fallocate()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 3/30/17 11:14 PM, Calvin Owens wrote:
> ---8<---
> From: Calvin Owens <calvinowens@xxxxxx>
> Date: Thu, 30 Mar 2017 20:50:55 -0700
> Subject: [PATCH] io/prealloc: Fix "falloc -p" to pass KEEP_SIZE
> 
> Otherwise, the syscall just returns -EOPPNOTSUPP.
> 
> Signed-off-by: Calvin Owens <calvinowens@xxxxxx>

Reviewed-by: Eric Sandeen <sandeen@xxxxxxxxxx>

> ---
>  io/prealloc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/io/prealloc.c b/io/prealloc.c
> index a9d66cc..1a1c9ca 100644
> --- a/io/prealloc.c
> +++ b/io/prealloc.c
> @@ -210,7 +210,7 @@ fallocate_f(
>  			mode = FALLOC_FL_KEEP_SIZE;
>  			break;
>  		case 'p':
> -			mode = FALLOC_FL_PUNCH_HOLE;
> +			mode = FALLOC_FL_PUNCH_HOLE|FALLOC_FL_KEEP_SIZE;
>  			break;
>  		case 'u':
>  			mode = FALLOC_FL_UNSHARE_RANGE;
> -- 2.9.3
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux