Message ID | 4E0DD4AB.9040900@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 07/01/2011 06:07 PM, Josef Bacik wrote: >> I found what my btrfs partition now is really slow. Something wrong >> happend. I try on 2.6.32 and 2.6.39 - same result. It is because >> partition is almost full? >> >> I run a simple cycle to clean some old files: >> for i in `cat /tmp/delit`; do rm -f $i ; done >> >> And it is takes about 5-10 second per file to delete. >> I get sysrq+w while rm is work - it is attached. >> > > Just a shot in the dark, but will you give this a shot and let me know > how it goes? Thanks Sorry for late answer. Im afraid I can`t test it now - then problem occurs I have no time to wait and format partition. But I will save this patch and if I run at this problem again I will try it and report here. Thanks for your help anyway.
diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 654755b..698a406 100644 --- a/fs/btrfs/transaction.c +++ b/fs/btrfs/transaction.c @@ -475,12 +475,6 @@ static int __btrfs_end_transaction(struct btrfs_trans_handle *trans, trans->transaction->delayed_refs.num_heads_ready > 64) { trans->delayed_ref_updates = 0; - /* - * do a full flush if the transaction is trying - * to close - */ - if (trans->transaction->delayed_refs.flushing) - cur = 0; btrfs_run_delayed_refs(trans, root, cur); } else {