Lines Matching +full:index +full:- +full:page
2 * Squashfs - a compressed read only filesystem for Linux
19 * Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
46 static int squashfs_symlink_readpage(struct file *file, struct page *page) in squashfs_symlink_readpage() argument
48 struct inode *inode = page->mapping->host; in squashfs_symlink_readpage()
49 struct super_block *sb = inode->i_sb; in squashfs_symlink_readpage()
50 struct squashfs_sb_info *msblk = sb->s_fs_info; in squashfs_symlink_readpage()
51 int index = page->index << PAGE_CACHE_SHIFT; in squashfs_symlink_readpage() local
52 u64 block = squashfs_i(inode)->start; in squashfs_symlink_readpage()
53 int offset = squashfs_i(inode)->offset; in squashfs_symlink_readpage()
54 int length = min_t(int, i_size_read(inode) - index, PAGE_CACHE_SIZE); in squashfs_symlink_readpage()
59 TRACE("Entered squashfs_symlink_readpage, page index %ld, start block " in squashfs_symlink_readpage()
60 "%llx, offset %x\n", page->index, block, offset); in squashfs_symlink_readpage()
63 * Skip index bytes into symlink metadata. in squashfs_symlink_readpage()
65 if (index) { in squashfs_symlink_readpage()
67 index); in squashfs_symlink_readpage()
70 squashfs_i(inode)->start, in squashfs_symlink_readpage()
71 squashfs_i(inode)->offset); in squashfs_symlink_readpage()
79 * kmap_atomic to map the page. Instead call the underlying in squashfs_symlink_readpage()
84 entry = squashfs_cache_get(sb, msblk->block_cache, block, 0); in squashfs_symlink_readpage()
85 if (entry->error) { in squashfs_symlink_readpage()
87 squashfs_i(inode)->start, in squashfs_symlink_readpage()
88 squashfs_i(inode)->offset); in squashfs_symlink_readpage()
93 pageaddr = kmap_atomic(page, KM_USER0); in squashfs_symlink_readpage()
95 length - bytes); in squashfs_symlink_readpage()
96 if (copied == length - bytes) in squashfs_symlink_readpage()
97 memset(pageaddr + length, 0, PAGE_CACHE_SIZE - length); in squashfs_symlink_readpage()
99 block = entry->next_index; in squashfs_symlink_readpage()
104 flush_dcache_page(page); in squashfs_symlink_readpage()
105 SetPageUptodate(page); in squashfs_symlink_readpage()
106 unlock_page(page); in squashfs_symlink_readpage()
110 SetPageError(page); in squashfs_symlink_readpage()
111 unlock_page(page); in squashfs_symlink_readpage()