[PATCH] shmem: recalculate file inode when fstat

2015-08-17 Thread Hugh Dickins
From: Yu Zhao Shmem uses shmem_recalc_inode to update i_blocks when it allocates page, undoes range or swaps. But mm can drop clean page without notifying shmem. This makes fstat sometimes return out-of-date block size. The problem can be partially solved when we add inode_operations->getattr wh

Re: [PATCH] shmem: recalculate file inode when fstat

2015-08-17 Thread Hugh Dickins
On Fri, 10 Jul 2015, Yu Zhao wrote: > Shmem uses shmem_recalc_inode to update i_blocks when it allocates > page, undoes range or swaps. But mm can drop clean page without > notifying shmem. This makes fstat sometimes return out-of-date > block size. > > The problem can be partially solved when we

[PATCH] shmem: recalculate file inode when fstat

2015-07-10 Thread Yu Zhao
Shmem uses shmem_recalc_inode to update i_blocks when it allocates page, undoes range or swaps. But mm can drop clean page without notifying shmem. This makes fstat sometimes return out-of-date block size. The problem can be partially solved when we add inode_operations->getattr which calls shmem_