inode.c (45dd052e67ad17c7a24874a783f41aeab15bc294) | inode.c (0b166a57e6222666292a481b742af92b50c3ba50) |
---|---|
1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * inode.c - NILFS inode operations. 4 * 5 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 6 * 7 * Written by Ryusuke Konishi. 8 * --- 132 unchanged lines hidden (view full) --- 141 * @file - file struct of the file to be read 142 * @page - the page to be read 143 */ 144static int nilfs_readpage(struct file *file, struct page *page) 145{ 146 return mpage_readpage(page, nilfs_get_block); 147} 148 | 1// SPDX-License-Identifier: GPL-2.0+ 2/* 3 * inode.c - NILFS inode operations. 4 * 5 * Copyright (C) 2005-2008 Nippon Telegraph and Telephone Corporation. 6 * 7 * Written by Ryusuke Konishi. 8 * --- 132 unchanged lines hidden (view full) --- 141 * @file - file struct of the file to be read 142 * @page - the page to be read 143 */ 144static int nilfs_readpage(struct file *file, struct page *page) 145{ 146 return mpage_readpage(page, nilfs_get_block); 147} 148 |
149/** 150 * nilfs_readpages() - implement readpages() method of nilfs_aops {} 151 * address_space_operations. 152 * @file - file struct of the file to be read 153 * @mapping - address_space struct used for reading multiple pages 154 * @pages - the pages to be read 155 * @nr_pages - number of pages to be read 156 */ 157static int nilfs_readpages(struct file *file, struct address_space *mapping, 158 struct list_head *pages, unsigned int nr_pages) | 149static void nilfs_readahead(struct readahead_control *rac) |
159{ | 150{ |
160 return mpage_readpages(mapping, pages, nr_pages, nilfs_get_block); | 151 mpage_readahead(rac, nilfs_get_block); |
161} 162 163static int nilfs_writepages(struct address_space *mapping, 164 struct writeback_control *wbc) 165{ 166 struct inode *inode = mapping->host; 167 int err = 0; 168 --- 135 unchanged lines hidden (view full) --- 304 return blockdev_direct_IO(iocb, inode, iter, nilfs_get_block); 305} 306 307const struct address_space_operations nilfs_aops = { 308 .writepage = nilfs_writepage, 309 .readpage = nilfs_readpage, 310 .writepages = nilfs_writepages, 311 .set_page_dirty = nilfs_set_page_dirty, | 152} 153 154static int nilfs_writepages(struct address_space *mapping, 155 struct writeback_control *wbc) 156{ 157 struct inode *inode = mapping->host; 158 int err = 0; 159 --- 135 unchanged lines hidden (view full) --- 295 return blockdev_direct_IO(iocb, inode, iter, nilfs_get_block); 296} 297 298const struct address_space_operations nilfs_aops = { 299 .writepage = nilfs_writepage, 300 .readpage = nilfs_readpage, 301 .writepages = nilfs_writepages, 302 .set_page_dirty = nilfs_set_page_dirty, |
312 .readpages = nilfs_readpages, | 303 .readahead = nilfs_readahead, |
313 .write_begin = nilfs_write_begin, 314 .write_end = nilfs_write_end, 315 /* .releasepage = nilfs_releasepage, */ 316 .invalidatepage = block_invalidatepage, 317 .direct_IO = nilfs_direct_IO, 318 .is_partially_uptodate = block_is_partially_uptodate, 319}; 320 --- 805 unchanged lines hidden --- | 304 .write_begin = nilfs_write_begin, 305 .write_end = nilfs_write_end, 306 /* .releasepage = nilfs_releasepage, */ 307 .invalidatepage = block_invalidatepage, 308 .direct_IO = nilfs_direct_IO, 309 .is_partially_uptodate = block_is_partially_uptodate, 310}; 311 --- 805 unchanged lines hidden --- |