Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
shmem_fs.h File Reference
#include <linux/swap.h>
#include <linux/mempolicy.h>
#include <linux/pagemap.h>
#include <linux/percpu_counter.h>
#include <linux/xattr.h>

Go to the source code of this file.

Data Structures

struct  shmem_inode_info
 
struct  shmem_sb_info
 

Functions

int shmem_init (void)
 
int shmem_fill_super (struct super_block *sb, void *data, int silent)
 
struct fileshmem_file_setup (const char *name, loff_t size, unsigned long flags)
 
int shmem_zero_setup (struct vm_area_struct *)
 
int shmem_lock (struct file *file, int lock, struct user_struct *user)
 
void shmem_unlock_mapping (struct address_space *mapping)
 
struct pageshmem_read_mapping_page_gfp (struct address_space *mapping, pgoff_t index, gfp_t gfp_mask)
 
void shmem_truncate_range (struct inode *inode, loff_t start, loff_t end)
 
int shmem_unuse (swp_entry_t entry, struct page *page)
 

Function Documentation

struct file* shmem_file_setup ( const char name,
loff_t  size,
unsigned long  flags 
)
read

Definition at line 2784 of file shmem.c.

int shmem_fill_super ( struct super_block sb,
void data,
int  silent 
)
int shmem_init ( void  )

Definition at line 2738 of file shmem.c.

int shmem_lock ( struct file file,
int  lock,
struct user_struct user 
)

Definition at line 2753 of file shmem.c.

struct page* shmem_read_mapping_page_gfp ( struct address_space mapping,
pgoff_t  index,
gfp_t  gfp 
)
read

shmem_read_mapping_page_gfp - read into page cache, using specified page allocation flags. : the page's address_space : the page index : the page allocator flags to use if allocating

This behaves as a tmpfs "read_cache_page_gfp(mapping, index, gfp)", with any new page allocations done using the specified allocation flags. But read_cache_page_gfp() uses the ->readpage() method: which does not suit tmpfs, since it may have pages in swapcache, and needs to find those for itself; although drivers/gpu/drm i915 and ttm rely upon this support.

i915_gem_object_get_pages_gtt() mixes __GFP_NORETRY | __GFP_NOWARN in with the mapping_gfp_mask(), to avoid OOMing the machine unnecessarily.

Definition at line 2877 of file shmem.c.

void shmem_truncate_range ( struct inode inode,
loff_t  start,
loff_t  end 
)

Definition at line 2762 of file shmem.c.

void shmem_unlock_mapping ( struct address_space mapping)

Definition at line 2758 of file shmem.c.

int shmem_unuse ( swp_entry_t  entry,
struct page page 
)

Definition at line 2748 of file shmem.c.

int shmem_zero_setup ( struct vm_area_struct vma)

shmem_zero_setup - setup a shared anonymous mapping : the vma to be mmapped is prepared by do_mmap_pgoff

Definition at line 2846 of file shmem.c.