Re: [PATCH 1/1] Btrfs: fix sparse warning

2014-08-18 Thread Fabian Frederick
On 05 August 2014 at 23:32 Zach Brown z...@zabbo.net wrote: Hello Zach,      Here's an untested patch which Try testing it.  It's easy with virtualization and xfstests. You'll find that sending to a file fails because each individual file write call that makes up a

Re: [PATCH 1/1] Btrfs: fix sparse warning

2014-08-05 Thread Fabian Frederick
On 04 August 2014 at 20:31 Zach Brown z...@zabbo.net wrote: On Sat, Aug 02, 2014 at 02:24:49PM +0200, Fabian Frederick wrote: On Thu, 17 Jul 2014 12:01:52 -0700 Zach Brown z...@zabbo.net wrote: @@ -515,7 +515,8 @@ static int write_buf(struct file *filp, const void *buf,

Re: [PATCH 1/1] Btrfs: fix sparse warning

2014-08-05 Thread Zach Brown
Hello Zach,      Here's an untested patch which Try testing it.  It's easy with virtualization and xfstests. You'll find that sending to a file fails because each individual file write call that makes up a send starts at offset 0 -- at the start of the file. Getting this

Re: [PATCH 1/1] Btrfs: fix sparse warning

2014-08-04 Thread Zach Brown
On Sat, Aug 02, 2014 at 02:24:49PM +0200, Fabian Frederick wrote: On Thu, 17 Jul 2014 12:01:52 -0700 Zach Brown z...@zabbo.net wrote: @@ -515,7 +515,8 @@ static int write_buf(struct file *filp, const void *buf, u32 len, loff_t *off) Though this probably wants to be

Re: [PATCH 1/1] Btrfs: fix sparse warning

2014-08-02 Thread Fabian Frederick
On Thu, 17 Jul 2014 12:01:52 -0700 Zach Brown z...@zabbo.net wrote: @@ -515,7 +515,8 @@ static int write_buf(struct file *filp, const void *buf, u32 len, loff_t *off) Though this probably wants to be rewritten in terms of kernel_write(). That'd give an opportunity to get rid

Re: [PATCH 1/1] Btrfs: fix sparse warning

2014-07-17 Thread Zach Brown
@@ -515,7 +515,8 @@ static int write_buf(struct file *filp, const void *buf, u32 len, loff_t *off) Though this probably wants to be rewritten in terms of kernel_write(). That'd give an opportunity to get rid of the sctx-send_off and have it use f_pos in the filp. Do you mean

Re: [PATCH 1/1] Btrfs: fix sparse warning

2014-07-16 Thread Zach Brown
On Tue, Jul 15, 2014 at 09:17:17PM +0200, Fabian Frederick wrote: Fix the following sparse warning: fs/btrfs/send.c:518:51: warning: incorrect type in argument 2 (different address spaces) fs/btrfs/send.c:518:51:expected char const [noderef] asn:1*noident fs/btrfs/send.c:518:51:got

[PATCH 1/1] Btrfs: fix sparse warning

2014-07-15 Thread Fabian Frederick
Fix the following sparse warning: fs/btrfs/send.c:518:51: warning: incorrect type in argument 2 (different address spaces) fs/btrfs/send.c:518:51:expected char const [noderef] asn:1*noident fs/btrfs/send.c:518:51:got char * We can safely use (const char __user *) with set_fs(KERNEL_DS)