You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branch 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull VFS fixes and cleanups from Al Viro. Most of this is the series to remove sync_supers() and the ->write_supers VFS callback from Artem Bityutskiy. One commit to do the actual removal work, a whole series of commits to fix up stale comments etc all over the tree. There's also a regression fix for an incorrect use of mnt_drop_write() in do_dentry_open(). * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: missed mnt_drop_write() in do_dentry_open() UBIFS: nuke pdflush from comments gfs2: nuke pdflush from comments drbd: nuke pdflush from comments nilfs2: nuke write_super from comments hfs: nuke write_super from comments vfs: nuke pdflush from comments jbd/jbd2: nuke write_super from comments btrfs: nuke pdflush from comments btrfs: nuke write_super from comments ext4: nuke pdflush from comments ext4: nuke write_super from comments ext3: nuke write_super from comments Documentation: fix the VM knobs descritpion WRT pdflush Documentation: get rid of write_super vfs: kill write_super and sync_supers
This commit is contained in:
@@ -224,8 +224,8 @@ all your transactions.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
Then at umount time , in your put_super() (2.4) or write_super() (2.5)
|
||||
you can then call journal_destroy() to clean up your in-core journal object.
|
||||
Then at umount time , in your put_super() you can then call journal_destroy()
|
||||
to clean up your in-core journal object.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
|
||||
@@ -114,7 +114,6 @@ prototypes:
|
||||
int (*drop_inode) (struct inode *);
|
||||
void (*evict_inode) (struct inode *);
|
||||
void (*put_super) (struct super_block *);
|
||||
void (*write_super) (struct super_block *);
|
||||
int (*sync_fs)(struct super_block *sb, int wait);
|
||||
int (*freeze_fs) (struct super_block *);
|
||||
int (*unfreeze_fs) (struct super_block *);
|
||||
@@ -136,7 +135,6 @@ write_inode:
|
||||
drop_inode: !!!inode->i_lock!!!
|
||||
evict_inode:
|
||||
put_super: write
|
||||
write_super: read
|
||||
sync_fs: read
|
||||
freeze_fs: write
|
||||
unfreeze_fs: write
|
||||
|
||||
@@ -94,9 +94,8 @@ protected.
|
||||
---
|
||||
[mandatory]
|
||||
|
||||
BKL is also moved from around sb operations. ->write_super() Is now called
|
||||
without BKL held. BKL should have been shifted into individual fs sb_op
|
||||
functions. If you don't need it, remove it.
|
||||
BKL is also moved from around sb operations. BKL should have been shifted into
|
||||
individual fs sb_op functions. If you don't need it, remove it.
|
||||
|
||||
---
|
||||
[informational]
|
||||
|
||||
@@ -216,7 +216,6 @@ struct super_operations {
|
||||
void (*drop_inode) (struct inode *);
|
||||
void (*delete_inode) (struct inode *);
|
||||
void (*put_super) (struct super_block *);
|
||||
void (*write_super) (struct super_block *);
|
||||
int (*sync_fs)(struct super_block *sb, int wait);
|
||||
int (*freeze_fs) (struct super_block *);
|
||||
int (*unfreeze_fs) (struct super_block *);
|
||||
@@ -273,9 +272,6 @@ or bottom half).
|
||||
put_super: called when the VFS wishes to free the superblock
|
||||
(i.e. unmount). This is called with the superblock lock held
|
||||
|
||||
write_super: called when the VFS superblock needs to be written to
|
||||
disc. This method is optional
|
||||
|
||||
sync_fs: called when VFS is writing out all dirty data associated with
|
||||
a superblock. The second parameter indicates whether the method
|
||||
should wait until the write out has been completed. Optional.
|
||||
|
||||
@@ -262,9 +262,9 @@ MINIMUM_BATTERY_MINUTES=10
|
||||
|
||||
#
|
||||
# Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been
|
||||
# exceeded, the kernel will wake pdflush which will then reduce the amount
|
||||
# of dirty memory to dirty_background_ratio. Set this nice and low, so once
|
||||
# some writeout has commenced, we do a lot of it.
|
||||
# exceeded, the kernel will wake flusher threads which will then reduce the
|
||||
# amount of dirty memory to dirty_background_ratio. Set this nice and low,
|
||||
# so once some writeout has commenced, we do a lot of it.
|
||||
#
|
||||
#DIRTY_BACKGROUND_RATIO=5
|
||||
|
||||
@@ -384,9 +384,9 @@ CPU_MAXFREQ=${CPU_MAXFREQ:-'slowest'}
|
||||
|
||||
#
|
||||
# Allowed dirty background ratio, in percent. Once DIRTY_RATIO has been
|
||||
# exceeded, the kernel will wake pdflush which will then reduce the amount
|
||||
# of dirty memory to dirty_background_ratio. Set this nice and low, so once
|
||||
# some writeout has commenced, we do a lot of it.
|
||||
# exceeded, the kernel will wake flusher threads which will then reduce the
|
||||
# amount of dirty memory to dirty_background_ratio. Set this nice and low,
|
||||
# so once some writeout has commenced, we do a lot of it.
|
||||
#
|
||||
DIRTY_BACKGROUND_RATIO=${DIRTY_BACKGROUND_RATIO:-'5'}
|
||||
|
||||
|
||||
@@ -76,8 +76,8 @@ huge pages although processes will also directly compact memory as required.
|
||||
|
||||
dirty_background_bytes
|
||||
|
||||
Contains the amount of dirty memory at which the pdflush background writeback
|
||||
daemon will start writeback.
|
||||
Contains the amount of dirty memory at which the background kernel
|
||||
flusher threads will start writeback.
|
||||
|
||||
Note: dirty_background_bytes is the counterpart of dirty_background_ratio. Only
|
||||
one of them may be specified at a time. When one sysctl is written it is
|
||||
@@ -89,7 +89,7 @@ other appears as 0 when read.
|
||||
dirty_background_ratio
|
||||
|
||||
Contains, as a percentage of total system memory, the number of pages at which
|
||||
the pdflush background writeback daemon will start writing out dirty data.
|
||||
the background kernel flusher threads will start writing out dirty data.
|
||||
|
||||
==============================================================
|
||||
|
||||
@@ -112,9 +112,9 @@ retained.
|
||||
dirty_expire_centisecs
|
||||
|
||||
This tunable is used to define when dirty data is old enough to be eligible
|
||||
for writeout by the pdflush daemons. It is expressed in 100'ths of a second.
|
||||
Data which has been dirty in-memory for longer than this interval will be
|
||||
written out next time a pdflush daemon wakes up.
|
||||
for writeout by the kernel flusher threads. It is expressed in 100'ths
|
||||
of a second. Data which has been dirty in-memory for longer than this
|
||||
interval will be written out next time a flusher thread wakes up.
|
||||
|
||||
==============================================================
|
||||
|
||||
@@ -128,7 +128,7 @@ data.
|
||||
|
||||
dirty_writeback_centisecs
|
||||
|
||||
The pdflush writeback daemons will periodically wake up and write `old' data
|
||||
The kernel flusher threads will periodically wake up and write `old' data
|
||||
out to disk. This tunable expresses the interval between those wakeups, in
|
||||
100'ths of a second.
|
||||
|
||||
|
||||
@@ -3537,9 +3537,9 @@ static void drbd_cleanup(void)
|
||||
}
|
||||
|
||||
/**
|
||||
* drbd_congested() - Callback for pdflush
|
||||
* drbd_congested() - Callback for the flusher thread
|
||||
* @congested_data: User data
|
||||
* @bdi_bits: Bits pdflush is currently interested in
|
||||
* @bdi_bits: Bits the BDI flusher thread is currently interested in
|
||||
*
|
||||
* Returns 1<<BDI_async_congested and/or 1<<BDI_sync_congested if we are congested.
|
||||
*/
|
||||
|
||||
@@ -1312,7 +1312,7 @@ EXPORT_SYMBOL(bio_copy_kern);
|
||||
* Note that this code is very hard to test under normal circumstances because
|
||||
* direct-io pins the pages with get_user_pages(). This makes
|
||||
* is_page_cache_freeable return false, and the VM will not clean the pages.
|
||||
* But other code (eg, pdflush) could clean the pages if they are mapped
|
||||
* But other code (eg, flusher threads) could clean the pages if they are mapped
|
||||
* pagecache.
|
||||
*
|
||||
* Simply disabling the call to bio_set_pages_dirty() is a good way to test the
|
||||
|
||||
+2
-1
@@ -324,7 +324,8 @@ static noinline int add_async_extent(struct async_cow *cow,
|
||||
* If this code finds it can't get good compression, it puts an
|
||||
* entry onto the work queue to write the uncompressed bytes. This
|
||||
* makes sure that both compressed inodes and uncompressed inodes
|
||||
* are written in the same order that pdflush sent them down.
|
||||
* are written in the same order that the flusher thread sent them
|
||||
* down.
|
||||
*/
|
||||
static noinline int compress_file_range(struct inode *inode,
|
||||
struct page *locked_page,
|
||||
|
||||
@@ -596,7 +596,7 @@ void btrfs_start_ordered_extent(struct inode *inode,
|
||||
/*
|
||||
* pages in the range can be dirty, clean or writeback. We
|
||||
* start IO on any dirty ones so the wait doesn't stall waiting
|
||||
* for pdflush to find them
|
||||
* for the flusher thread to find them
|
||||
*/
|
||||
if (!test_bit(BTRFS_ORDERED_DIRECT, &entry->flags))
|
||||
filemap_fdatawrite_range(inode->i_mapping, start, end);
|
||||
|
||||
@@ -100,10 +100,6 @@ static void __save_error_info(struct btrfs_fs_info *fs_info)
|
||||
fs_info->fs_state = BTRFS_SUPER_FLAG_ERROR;
|
||||
}
|
||||
|
||||
/* NOTE:
|
||||
* We move write_super stuff at umount in order to avoid deadlock
|
||||
* for umount hold all lock.
|
||||
*/
|
||||
static void save_error_info(struct btrfs_fs_info *fs_info)
|
||||
{
|
||||
__save_error_info(fs_info);
|
||||
|
||||
@@ -1744,10 +1744,6 @@ int btrfs_init_new_device(struct btrfs_root *root, char *device_path)
|
||||
|
||||
device->fs_devices = root->fs_info->fs_devices;
|
||||
|
||||
/*
|
||||
* we don't want write_supers to jump in here with our device
|
||||
* half setup
|
||||
*/
|
||||
mutex_lock(&root->fs_info->fs_devices->device_list_mutex);
|
||||
list_add_rcu(&device->dev_list, &root->fs_info->fs_devices->devices);
|
||||
list_add(&device->dev_alloc_list,
|
||||
|
||||
@@ -3459,14 +3459,6 @@ ext3_reserve_inode_write(handle_t *handle, struct inode *inode,
|
||||
* inode out, but prune_icache isn't a user-visible syncing function.
|
||||
* Whenever the user wants stuff synced (sys_sync, sys_msync, sys_fsync)
|
||||
* we start and wait on commits.
|
||||
*
|
||||
* Is this efficient/effective? Well, we're being nice to the system
|
||||
* by cleaning up our inodes proactively so they can be reaped
|
||||
* without I/O. But we are potentially leaving up to five seconds'
|
||||
* worth of inodes floating about which prune_icache wants us to
|
||||
* write out. One way to fix that would be to get prune_icache()
|
||||
* to do a write_super() to free up some memory. It has the desired
|
||||
* effect.
|
||||
*/
|
||||
int ext3_mark_inode_dirty(handle_t *handle, struct inode *inode)
|
||||
{
|
||||
|
||||
@@ -64,11 +64,6 @@ static int ext3_freeze(struct super_block *sb);
|
||||
|
||||
/*
|
||||
* Wrappers for journal_start/end.
|
||||
*
|
||||
* The only special thing we need to do here is to make sure that all
|
||||
* journal_end calls result in the superblock being marked dirty, so
|
||||
* that sync() will call the filesystem's write_super callback if
|
||||
* appropriate.
|
||||
*/
|
||||
handle_t *ext3_journal_start_sb(struct super_block *sb, int nblocks)
|
||||
{
|
||||
@@ -90,12 +85,6 @@ handle_t *ext3_journal_start_sb(struct super_block *sb, int nblocks)
|
||||
return journal_start(journal, nblocks);
|
||||
}
|
||||
|
||||
/*
|
||||
* The only special thing we need to do here is to make sure that all
|
||||
* journal_stop calls result in the superblock being marked dirty, so
|
||||
* that sync() will call the filesystem's write_super callback if
|
||||
* appropriate.
|
||||
*/
|
||||
int __ext3_journal_stop(const char *where, handle_t *handle)
|
||||
{
|
||||
struct super_block *sb;
|
||||
|
||||
+1
-9
@@ -1970,7 +1970,7 @@ static void ext4_end_io_buffer_write(struct buffer_head *bh, int uptodate);
|
||||
* This function can get called via...
|
||||
* - ext4_da_writepages after taking page lock (have journal handle)
|
||||
* - journal_submit_inode_data_buffers (no journal handle)
|
||||
* - shrink_page_list via pdflush (no journal handle)
|
||||
* - shrink_page_list via the kswapd/direct reclaim (no journal handle)
|
||||
* - grab_page_cache when doing write_begin (have journal handle)
|
||||
*
|
||||
* We don't do any block allocation in this function. If we have page with
|
||||
@@ -4589,14 +4589,6 @@ static int ext4_expand_extra_isize(struct inode *inode,
|
||||
* inode out, but prune_icache isn't a user-visible syncing function.
|
||||
* Whenever the user wants stuff synced (sys_sync, sys_msync, sys_fsync)
|
||||
* we start and wait on commits.
|
||||
*
|
||||
* Is this efficient/effective? Well, we're being nice to the system
|
||||
* by cleaning up our inodes proactively so they can be reaped
|
||||
* without I/O. But we are potentially leaving up to five seconds'
|
||||
* worth of inodes floating about which prune_icache wants us to
|
||||
* write out. One way to fix that would be to get prune_icache()
|
||||
* to do a write_super() to free up some memory. It has the desired
|
||||
* effect.
|
||||
*/
|
||||
int ext4_mark_inode_dirty(handle_t *handle, struct inode *inode)
|
||||
{
|
||||
|
||||
@@ -326,11 +326,6 @@ static void ext4_put_nojournal(handle_t *handle)
|
||||
|
||||
/*
|
||||
* Wrappers for jbd2_journal_start/end.
|
||||
*
|
||||
* The only special thing we need to do here is to make sure that all
|
||||
* journal_end calls result in the superblock being marked dirty, so
|
||||
* that sync() will call the filesystem's write_super callback if
|
||||
* appropriate.
|
||||
*/
|
||||
handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
|
||||
{
|
||||
@@ -356,12 +351,6 @@ handle_t *ext4_journal_start_sb(struct super_block *sb, int nblocks)
|
||||
return jbd2_journal_start(journal, nblocks);
|
||||
}
|
||||
|
||||
/*
|
||||
* The only special thing we need to do here is to make sure that all
|
||||
* jbd2_journal_stop calls result in the superblock being marked dirty, so
|
||||
* that sync() will call the filesystem's write_super callback if
|
||||
* appropriate.
|
||||
*/
|
||||
int __ext4_journal_stop(const char *where, unsigned int line, handle_t *handle)
|
||||
{
|
||||
struct super_block *sb;
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ static int gfs2_aspace_writepage(struct page *page, struct writeback_control *wb
|
||||
/*
|
||||
* If it's a fully non-blocking write attempt and we cannot
|
||||
* lock the buffer then redirty the page. Note that this can
|
||||
* potentially cause a busy-wait loop from pdflush and kswapd
|
||||
* potentially cause a busy-wait loop from flusher thread and kswapd
|
||||
* activity, but those code paths have their own higher-level
|
||||
* throttling.
|
||||
*/
|
||||
|
||||
+2
-2
@@ -236,10 +236,10 @@ out:
|
||||
* hfs_mdb_commit()
|
||||
*
|
||||
* Description:
|
||||
* This updates the MDB on disk (look also at hfs_write_super()).
|
||||
* This updates the MDB on disk.
|
||||
* It does not check, if the superblock has been modified, or
|
||||
* if the filesystem has been mounted read-only. It is mainly
|
||||
* called by hfs_write_super() and hfs_btree_extend().
|
||||
* called by hfs_sync_fs() and flush_mdb().
|
||||
* Input Variable(s):
|
||||
* struct hfs_mdb *mdb: Pointer to the hfs MDB
|
||||
* int backup;
|
||||
|
||||
+2
-2
@@ -534,8 +534,8 @@ int journal_start_commit(journal_t *journal, tid_t *ptid)
|
||||
ret = 1;
|
||||
} else if (journal->j_committing_transaction) {
|
||||
/*
|
||||
* If ext3_write_super() recently started a commit, then we
|
||||
* have to wait for completion of that transaction
|
||||
* If commit has been started, then we have to wait for
|
||||
* completion of that transaction.
|
||||
*/
|
||||
if (ptid)
|
||||
*ptid = journal->j_committing_transaction->t_tid;
|
||||
|
||||
+2
-2
@@ -612,8 +612,8 @@ int jbd2_journal_start_commit(journal_t *journal, tid_t *ptid)
|
||||
ret = 1;
|
||||
} else if (journal->j_committing_transaction) {
|
||||
/*
|
||||
* If ext3_write_super() recently started a commit, then we
|
||||
* have to wait for completion of that transaction
|
||||
* If commit has been started, then we have to wait for
|
||||
* completion of that transaction.
|
||||
*/
|
||||
if (ptid)
|
||||
*ptid = journal->j_committing_transaction->t_tid;
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user