Lines Matching defs:mapping

182  * we get exclusion from try_to_free_buffers with the blockdev mapping's
185 * Hack idea: for the blockdev mapping, private_lock contention
319 struct inode *inode = folio->mapping->host;
355 struct inode *inode = bh->b_folio->mapping->host;
480 * try_to_free_buffers() will be operating against the *blockdev* mapping
485 * mapping->private_lock does *not* protect mapping->private_list! In fact,
486 * mapping->private_list will always be protected by the backing blockdev's
567 * sync_mapping_buffers - write out & wait upon a mapping's "associated" buffers
568 * @mapping: the mapping which wants those buffers written
570 * Starts I/O against the buffers at mapping->private_list, and waits upon
574 * @mapping is a file or directory which needs those buffers to be written for
577 int sync_mapping_buffers(struct address_space *mapping)
579 struct address_space *buffer_mapping = mapping->private_data;
581 if (buffer_mapping == NULL || list_empty(&mapping->private_list))
585 &mapping->private_list);
678 struct address_space *mapping = inode->i_mapping;
679 struct address_space *buffer_mapping = bh->b_folio->mapping;
682 if (!mapping->private_data) {
683 mapping->private_data = buffer_mapping;
685 BUG_ON(mapping->private_data != buffer_mapping);
690 &mapping->private_list);
691 bh->b_assoc_map = mapping;
722 bool block_dirty_folio(struct address_space *mapping, struct folio *folio)
727 spin_lock(&mapping->private_lock);
743 spin_unlock(&mapping->private_lock);
746 __folio_mark_dirty(folio, mapping, 1);
751 __mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
780 struct address_space *mapping;
790 mapping = bh->b_assoc_map;
797 bh->b_assoc_map = mapping;
811 * Kick off IO for the previous mapping. Note
812 * that we will not run the very last mapping,
829 mapping = bh->b_assoc_map;
836 &mapping->private_list);
837 bh->b_assoc_map = mapping;
860 * NOTE: we take the inode's blockdev's mapping's private_lock. Which
867 struct address_space *mapping = &inode->i_data;
868 struct list_head *list = &mapping->private_list;
869 struct address_space *buffer_mapping = mapping->private_data;
890 struct address_space *mapping = &inode->i_data;
891 struct list_head *list = &mapping->private_list;
892 struct address_space *buffer_mapping = mapping->private_data;
1183 * mark_buffer_dirty() is atomic. It takes bh->b_folio->mapping->private_lock,
1184 * i_pages lock and mapping->host->i_lock.
1206 struct address_space *mapping = NULL;
1210 mapping = folio->mapping;
1211 if (mapping)
1212 __folio_mark_dirty(folio, mapping, 0);
1215 if (mapping)
1216 __mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
1225 if (bh->b_folio && bh->b_folio->mapping)
1226 mapping_set_error(bh->b_folio->mapping, -EIO);
1259 struct address_space *buffer_mapping = bh->b_folio->mapping;
1657 spin_lock(&folio->mapping->private_lock);
1669 spin_unlock(&folio->mapping->private_lock);
1843 * handle any aliases from the underlying blockdev's mapping.
1955 mapping_set_error(folio->mapping, err);
2087 struct inode *inode = folio->mapping->host;
2217 int block_write_begin(struct address_space *mapping, loff_t pos, unsigned len,
2224 page = grab_cache_page_write_begin(mapping, index);
2240 int block_write_end(struct file *file, struct address_space *mapping,
2274 int generic_write_end(struct file *file, struct address_space *mapping,
2278 struct inode *inode = mapping->host;
2282 copied = block_write_end(file, mapping, pos, len, copied, page, fsdata);
2365 struct inode *inode = folio->mapping->host;
2466 struct address_space *mapping = inode->i_mapping;
2467 const struct address_space_operations *aops = mapping->a_ops;
2476 err = aops->write_begin(NULL, mapping, size, 0, &page, &fsdata);
2480 err = aops->write_end(NULL, mapping, size, 0, 0, page, fsdata);
2488 static int cont_expand_zero(struct file *file, struct address_space *mapping,
2491 struct inode *inode = mapping->host;
2492 const struct address_space_operations *aops = mapping->a_ops;
2512 err = aops->write_begin(file, mapping, curpos, len,
2517 err = aops->write_end(file, mapping, curpos, len, len,
2524 balance_dirty_pages_ratelimited(mapping);
2545 err = aops->write_begin(file, mapping, curpos, len,
2550 err = aops->write_end(file, mapping, curpos, len, len,
2565 int cont_write_begin(struct file *file, struct address_space *mapping,
2570 struct inode *inode = mapping->host;
2575 err = cont_expand_zero(file, mapping, pos, bytes);
2585 return block_write_begin(mapping, pos, len, pagep, get_block);
2601 * holes and correct delalloc and unwritten extent mapping on filesystems that
2625 if ((folio->mapping != inode->i_mapping) ||
2652 int block_truncate_page(struct address_space *mapping,
2659 struct inode *inode = mapping->host;
2674 folio = filemap_grab_folio(mapping, index);
2732 struct inode * const inode = folio->mapping->host;
2760 sector_t generic_block_bmap(struct address_space *mapping, sector_t block,
2763 struct inode *inode = mapping->host;
2891 * locking the folio or by holding its mapping's private_lock.
2941 struct address_space * const mapping = folio->mapping;
2949 if (mapping == NULL) { /* can this still happen? */
2954 spin_lock(&mapping->private_lock);
2973 spin_unlock(&mapping->private_lock);