On Tue, 28 Jan 2014 09:50:38 -0500, Josef Bacik wrote:
>
> On 01/14/2014 07:31 AM, Miao Xie wrote:
>> Signed-off-by: Miao Xie <miaox@xxxxxxxxxxxxxx>
>> ---
>> fs/btrfs/ordered-data.c | 2 ++
>> 1 files changed, 2 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/btrfs/ordered-data.c b/fs/btrfs/ordered-data.c
>> index 69582d5..e4c3d56 100644
>> --- a/fs/btrfs/ordered-data.c
>> +++ b/fs/btrfs/ordered-data.c
>> @@ -433,6 +433,8 @@ void btrfs_get_logged_extents(struct btrfs_root *log, struct inode *inode)
>> spin_lock_irq(&tree->lock);
>> for (n = rb_first(&tree->tree); n; n = rb_next(n)) {
>> ordered = rb_entry(n, struct btrfs_ordered_extent, rb_node);
>> + if (test_bit(BTRFS_ORDERED_LOGGED_CSUM, &ordered->flags))
>> + continue;
>> spin_lock(&log->log_extents_lock[index]);
>> if (list_empty(&ordered->log_list)) {
>> list_add_tail(&ordered->log_list, &log->logged_list[index]);
> This isn't right, the logged extents are the extents we need to wait on before we exit fsync, logged_csum tells us that we've already copied its csums into the log. Thanks,
My mistake, We need another flag to filter the ordered extents.
Thanks
Miao
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html