search for: reserve_metadata_byt

Displaying 9 results from an estimated 9 matches for "reserve_metadata_byt".

Did you mean: reserve_metadata_bytes
2010 Oct 26
0
[PATCH] Btrfs: set trans to null in reserve_metadata_bytes if we commit the transaction
...;josef@redhat.com> --- fs/btrfs/extent-tree.c | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 180a501..e2dfd4a 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -3157,6 +3157,7 @@ static int reserve_metadata_bytes(struct btrfs_trans_handle *trans, int retries = 0; int ret = 0; bool reserved = false; + bool committed = false; again: ret = -ENOSPC; @@ -3249,17 +3250,19 @@ again: goto out; ret = -EAGAIN; - if (trans) + if (trans || committed) goto out; - ret = -ENOSPC; trans = btrfs...
2012 Jul 31
2
Btrfs Intermittent ENOSPC Issues
...ion or no compression. (2) I''ve inserted some trace_printk debugging statements to trace back the call stack, and the ENOSPC errors only seem to occur on a new transaction: vfs_create -> btrfs_create -> btrfs_start_transaction -> start_transaction -> btrfs_block_rsv_add -> reserve_metadata_bytes. (3) The ENOSPC condition will usually clear in a few seconds, allowing writes to proceed. (4) I''ve added a loop to the reserve_metadata_bytes() function to loop back with ''flush_state = FLUSH_DELALLOC (1)'' for 1024 retries. This reduces and/or eliminates the ENOSPC...
2012 Aug 01
7
[PATCH] Btrfs: barrier before waitqueue_active
We need an smb_mb() before waitqueue_active to avoid missing wakeups. Before Mitch was hitting a deadlock between the ordered flushers and the transaction commit because the ordered flushers were waiting for more refs and were never woken up, so those smp_mb()''s are the most important. Everything else I added for correctness sake and to avoid getting bitten by this again somewhere else.
2012 Jul 30
4
balance disables nodatacow
I have a 3 disk raid1 filesystem mounted with nodatacow. I have a folder in said filesystem with the ''C'' NOCOW & ''Z'' Not_Compressed flags set for good measure. I then copy in a large file and proceed to make random modifications. Filefrag shows no additional extents created, good so far. A big thank you to the those devs who got that working. However, after
2013 Mar 01
0
[PATCH 1/2] Btrfs: don't call btrfs_qgroup_free if just btrfs_qgroup_reserve fails
...s/extent-tree.c +++ b/fs/btrfs/extent-tree.c @@ -4772,9 +4772,14 @@ int btrfs_delalloc_reserve_metadata(struct inode *inode, u64 num_bytes) * ret != 0 here means the qgroup reservation failed, we go straight to * the shared error handling then. */ - if (ret == 0) + if (ret == 0) { ret = reserve_metadata_bytes(root, block_rsv, to_reserve, flush); + if (ret && root->fs_info->quota_enabled) { + btrfs_qgroup_free(root, num_bytes + + nr_extents * root->leafsize); + } + } if (ret) { u64 to_free = 0; @@ -4805,10 +4810,6 @@ int btrfs_delalloc_reserve_metadata(struct...
2012 Jan 22
0
Compiler warnings: cast from pointer to integer of different size
...warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] fs/btrfs/extent-tree.c: In function ‘btrfs_free_reserved_data_space’: fs/btrfs/extent-tree.c:3335:11: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] fs/btrfs/extent-tree.c: In function ‘reserve_metadata_bytes’: fs/btrfs/extent-tree.c:3698:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] fs/btrfs/extent-tree.c:3769:13: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] fs/btrfs/extent-tree.c: In function ‘block_rsv_release_bytes’: fs/btrfs...
2011 Jul 26
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations
...es_reserved; - reserved = space_info->bytes_reserved; + if (reserved > space_info->bytes_may_use) + reclaimed += reserved - space_info->bytes_may_use; + reserved = space_info->bytes_may_use; spin_unlock(&space_info->lock); loops++; @@ -3388,7 +3413,6 @@ static int reserve_metadata_bytes(struct btrfs_trans_handle *trans, int ret = 0; bool committed = false; bool flushing = false; - again: ret = 0; spin_lock(&space_info->lock); @@ -3430,7 +3454,7 @@ again: if (unused <= space_info->total_bytes) { unused = space_info->total_bytes - unused; if (unu...
2011 Jul 27
0
[PATCH] Btrfs: use bytes_may_use for all ENOSPC reservations V2
...es_reserved; - reserved = space_info->bytes_reserved; + if (reserved > space_info->bytes_may_use) + reclaimed += reserved - space_info->bytes_may_use; + reserved = space_info->bytes_may_use; spin_unlock(&space_info->lock); loops++; @@ -3388,7 +3412,6 @@ static int reserve_metadata_bytes(struct btrfs_trans_handle *trans, int ret = 0; bool committed = false; bool flushing = false; - again: ret = 0; spin_lock(&space_info->lock); @@ -3430,7 +3453,7 @@ again: if (unused <= space_info->total_bytes) { unused = space_info->total_bytes - unused; if (unu...
2011 Oct 06
26
[PATCH v0 00/18] btfs: Subvolume Quota Groups
This is a first draft of a subvolume quota implementation. It is possible to limit subvolumes and any group of subvolumes and also to track the amount of space that will get freed when deleting snapshots. The current version is functionally incomplete, with the main missing feature being the initial scan and rescan of an existing filesystem. I put some effort into writing an introduction into