On 7/24/19 9:15 AM, Greg Kroah-Hartman wrote:
On Wed, Jul 24, 2019 at 05:40:39PM +0200, Greg Kroah-Hartman wrote:
On Wed, Jul 24, 2019 at 08:07:50AM -0700, Guenter Roeck wrote:
v4.9.y to v5.1.y:
fs/btrfs/file.c: In function 'btrfs_punch_hole':
fs/btrfs/file.c:2787:27: error: invalid initializer
struct timespec64 now = current_time(inode);
^~~~~~~~~~~~
fs/btrfs/file.c:2790:18: error: incompatible types when assigning to type 'struct timespec' from type 'struct timespec64'
Oops, no, this looks like a 32bit issue, let me dig into that...
Ok, this makes no sense.
A few lines above this we do:
inode->i_mtime = inode->i_ctime = current_time(inode);
And here we are now doing:
struct timespec64 now = current_time(inode);
inode_inc_iversion(inode);
inode->i_mtime = now;
inode->i_ctime = now;
And current_time() is defined as:
extern struct timespec64 current_time(struct inode *inode);
v4.9.186-108-g5b3c7cd16340 and v4.9.186-126-g97ad1fbc1478, line 1489 of fs.h:
extern struct timespec current_fs_time(struct super_block *sb);
Your code base seems to be different :-(.
Guenter
I have no idea what is going on :(
This is caused by Felipe's patch: 179006688a7e ("Btrfs: add missing
inode version, ctime and mtime updates when punching hole"). Felipe,
any ideas?
thanks,
greg k-h