Lines Matching refs:size

88 #define VM_ACCT(size)    (PAGE_ALIGN(size) >> PAGE_SHIFT)
90 /* Pretend that each entry is of this size in directory's i_size */
96 /* Symlink up to this size is kmalloc'ed instead of using a swappable page */
159 * shmem_file_setup pre-accounts the whole fixed size of a VM object,
164 static inline int shmem_acct_size(unsigned long flags, loff_t size)
167 0 : security_vm_enough_memory_mm(current->mm, VM_ACCT(size));
170 static inline void shmem_unacct_size(unsigned long flags, loff_t size)
173 vm_unacct_memory(VM_ACCT(size));
2511 /* Some things misbehave if size == 0 on a directory */
2912 loff_t fpos, size_t size)
2916 size = min_t(size_t, size, PAGE_SIZE - offset);
2925 .len = size,
2930 return size;
3665 const char *name, void *buffer, size_t size)
3670 return simple_xattr_get(&info->xattrs, name, buffer, size);
3677 size_t size, int flags)
3686 ispace = simple_xattr_space(name, size);
3697 old_xattr = simple_xattr_set(&info->xattrs, name, value, size, flags);
3702 old_xattr->size);
3741 static ssize_t shmem_listxattr(struct dentry *dentry, char *buffer, size_t size)
3744 return simple_xattr_list(d_inode(dentry), &info->xattrs, buffer, size);
3883 fsparam_string("size", Opt_size),
3904 unsigned long long size;
3916 size = memparse(param->string, &rest);
3918 size <<= PAGE_SHIFT;
3919 size *= totalram_pages();
3920 do_div(size, 100);
3925 ctx->blocks = DIV_ROUND_UP(size, PAGE_SIZE);
4027 size = memparse(param->string, &rest);
4028 if (*rest || !size)
4030 if (size > SHMEM_QUOTA_MAX_SPC_LIMIT)
4033 ctx->qlimits.usrquota_bhardlimit = size;
4036 size = memparse(param->string, &rest);
4037 if (*rest || !size)
4039 if (size > SHMEM_QUOTA_MAX_SPC_LIMIT)
4042 ctx->qlimits.grpquota_bhardlimit = size;
4045 size = memparse(param->string, &rest);
4046 if (*rest || !size)
4048 if (size > SHMEM_QUOTA_MAX_INO_LIMIT)
4051 ctx->qlimits.usrquota_ihardlimit = size;
4054 size = memparse(param->string, &rest);
4055 if (*rest || !size)
4057 if (size > SHMEM_QUOTA_MAX_INO_LIMIT)
4060 ctx->qlimits.grpquota_ihardlimit = size;
4131 err = "Cannot retroactively limit size";
4136 err = "Too small a size for current use";
4220 seq_printf(seq, ",size=%luk", K(sbinfo->max_blocks));
4773 #define shmem_acct_size(flags, size) 0
4774 #define shmem_unacct_size(flags, size) do {} while (0)
4787 static struct file *__shmem_file_setup(struct vfsmount *mnt, const char *name, loff_t size,
4796 if (size < 0 || size > MAX_LFS_FILESIZE)
4799 if (shmem_acct_size(flags, size))
4809 shmem_unacct_size(flags, size);
4813 inode->i_size = size;
4815 res = ERR_PTR(ramfs_nommu_expand_for_mapping(inode, size));
4831 * @size: size to be set for the file
4832 * @flags: VM_NORESERVE suppresses pre-accounting of the entire object size
4834 struct file *shmem_kernel_file_setup(const char *name, loff_t size, unsigned long flags)
4836 return __shmem_file_setup(shm_mnt, name, size, flags, S_PRIVATE);
4842 * @size: size to be set for the file
4843 * @flags: VM_NORESERVE suppresses pre-accounting of the entire object size
4845 struct file *shmem_file_setup(const char *name, loff_t size, unsigned long flags)
4847 return __shmem_file_setup(shm_mnt, name, size, flags, 0);
4855 * @size: size to be set for the file
4856 * @flags: VM_NORESERVE suppresses pre-accounting of the entire object size
4859 loff_t size, unsigned long flags)
4861 return __shmem_file_setup(mnt, name, size, flags, 0);
4872 loff_t size = vma->vm_end - vma->vm_start;
4880 file = shmem_kernel_file_setup("dev/zero", size, vma->vm_flags);