diff options
| author | Hugh Dickins <hugh@veritas.com> | 2002-10-02 23:00:59 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-10-02 23:00:59 -0700 |
| commit | 03844e4b25f5993847fea8f2936eee540167cd41 (patch) | |
| tree | ad34dd97f81a610009eeb0b3c75b0253958a1f69 /include/linux | |
| parent | 7aa8800b3677bf5b52d2404512a63b2ee1a1bf33 (diff) | |
[PATCH] shmem: avoid metadata leakiness
akpm and wli each discovered unfortunate behaviour of dbench on tmpfs:
after tmpfs has reached its data memory limit, dbench continues to
lseek and write, and tmpfs carries on allocating unlimited metadata
blocks to accommodate the data it then refuses. That particular
behaviour could be simply fixed by checking earlier; but I think tmpfs
metablocks should be subject to the memory limit, and included in df
and du accounting. Also, manipulate inode->i_blocks under lock, was
missed before.
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/shmem_fs.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/shmem_fs.h b/include/linux/shmem_fs.h index 81c150bb8081..c7a4cdf6009a 100644 --- a/include/linux/shmem_fs.h +++ b/include/linux/shmem_fs.h @@ -14,7 +14,8 @@ struct shmem_inode_info { unsigned long next_index; swp_entry_t i_direct[SHMEM_NR_DIRECT]; /* for the first blocks */ void **i_indirect; /* indirect blocks */ - unsigned long swapped; + unsigned long alloced; /* data pages allocated to file */ + unsigned long swapped; /* subtotal assigned to swap */ unsigned long flags; struct list_head list; struct inode vfs_inode; |
