2010-04-05 19:37:06

by Chris Mason

[permalink] [raw]
Subject: [GIT PULL] Btrfs updates

Hello everyone,

The master branch of the btrfs-unstable repo has a collection of fixes:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Josef fixed a few different ENOSPC problems, and removed the mount -o
max_extent mount option, which was not used and didn't fit in well with
enospc at all.

Sage fixed up when and how we add the directory entries that go with
snapshots, which will avoid dangling directory entries if we crash at
the wrong time during snapshot creation.

Nick Piggin made the btrfs page cache code a little bit less of a special
snowflake, switching us back to the proper API.

Zhao Lei and Miao Xie contributed a long series of cleanups and fixes.
I've put the cleanups into a .35 queue and the fixes are here.

Josef Bacik (4) commits (+32/-91):
Btrfs: fail to mount if we have problems reading the block groups (+12/-4)
Btrfs: fix small race with delalloc flushing waitqueue's (+4/-5)
Btrfs: fix chunk allocate size calculation (+3/-1)
Btrfs: kill max_extent mount option (+13/-81)

Zhao Lei (3) commits (+9/-12):
Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk() (+2/-2)
Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree() (+2/-0)
Btrfs: Remove unnecessary finish_wait() in wait_current_trans() (+5/-10)

Dan Carpenter (3) commits (+5/-1):
Btrfs: handle kmalloc() failure in inode lookup ioctl (+3/-0)
Btrfs: check btrfs_get_extent return for IS_ERR() (+1/-1)
Btrfs: dereferencing freed memory (+1/-0)

Sage Weil (1) commits (+31/-66):
Btrfs: create snapshot references in same commit as snapshot

Andrea Gelmini (1) commits (+0/-1):
Btrfs: remove duplicate include in ioctl.c

Chris Mason (1) commits (+4/-0):
Btrfs: add check for changed leaves in setup_leaf_for_split

Miao Xie (1) commits (+4/-1):
Btrfs: add NULL check for do_walk_down()

Nick Piggin (1) commits (+5/-32):
Btrfs: use add_to_page_cache_lru, use __page_cache_alloc

Total: (15) commits

fs/btrfs/transaction.c | 112 +++++++++++++++---------------------------------
fs/btrfs/inode.c | 59 +------------------------
fs/btrfs/super.c | 23 +--------
fs/btrfs/extent-tree.c | 23 ++++++---
fs/btrfs/compression.c | 22 +--------
fs/btrfs/extent_io.c | 15 ------
fs/btrfs/disk-io.c | 12 +++--
fs/btrfs/volumes.c | 10 +++-
fs/btrfs/ioctl.c | 7 ++-
fs/btrfs/ordered-data.c | 6 +-
fs/btrfs/ctree.c | 4 +
fs/btrfs/ctree.h | 1
12 files changed, 90 insertions(+), 204 deletions(-)


2010-04-06 15:41:41

by Chris Mason

[permalink] [raw]
Subject: Re: [GIT PULL] Btrfs updates

On Mon, Apr 05, 2010 at 03:36:37PM -0400, Chris Mason wrote:
> Hello everyone,
>
> The master branch of the btrfs-unstable repo has a collection of fixes:
>
> git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master
>

That pull request was missing another enospc fix from Josef, and Yan
Zheng noticed we were sometimes trying to allocate zero sized chunks
from the disk pool. I've updated the git tree with two new commits,
here is the corrected shortlog:

Josef Bacik (5) commits (+47/-96):
Btrfs: fail to mount if we have problems reading the block groups (+12/-4)
Btrfs: fix small race with delalloc flushing waitqueue's (+4/-5)
Btrfs: fix chunk allocate size calculation (+3/-1)
Btrfs: fix data enospc check overflow (+15/-5)
Btrfs: kill max_extent mount option (+13/-81)

Zhao Lei (3) commits (+9/-12):
Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk() (+2/-2)
Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree() (+2/-0)
Btrfs: Remove unnecessary finish_wait() in wait_current_trans() (+5/-10)

Dan Carpenter (3) commits (+5/-1):
Btrfs: handle kmalloc() failure in inode lookup ioctl (+3/-0)
Btrfs: check btrfs_get_extent return for IS_ERR() (+1/-1)
Btrfs: dereferencing freed memory (+1/-0)

Chris Mason (2) commits (+10/-0):
Btrfs: make sure the chunk allocator doesn't create zero length chunks (+6/-0)
Btrfs: add check for changed leaves in setup_leaf_for_split (+4/-0)

Sage Weil (1) commits (+31/-66):
Btrfs: create snapshot references in same commit as snapshot

Andrea Gelmini (1) commits (+0/-1):
Btrfs: remove duplicate include in ioctl.c

Miao Xie (1) commits (+4/-1):
Btrfs: add NULL check for do_walk_down()

Nick Piggin (1) commits (+5/-32):
Btrfs: use add_to_page_cache_lru, use __page_cache_alloc

Total: (17) commits

fs/btrfs/transaction.c | 112 +++++++++++++++---------------------------------
fs/btrfs/inode.c | 59 +------------------------
fs/btrfs/extent-tree.c | 43 ++++++++++++------
fs/btrfs/super.c | 23 +--------
fs/btrfs/compression.c | 22 +--------
fs/btrfs/volumes.c | 16 +++++-
fs/btrfs/extent_io.c | 15 ------
fs/btrfs/disk-io.c | 12 +++--
fs/btrfs/ioctl.c | 7 ++-
fs/btrfs/ordered-data.c | 6 +-
fs/btrfs/ctree.c | 4 +
fs/btrfs/ctree.h | 1
12 files changed, 111 insertions(+), 209 deletions(-)

2010-06-02 02:58:09

by Miao Xie

[permalink] [raw]
Subject: Re: [GIT PULL] Btrfs updates

Hi, Chris

on 2010-5-27 23:15, Chris Mason wrote:
> My commits here are just integrating the two and fixing a few bugs in
> the result.
>
> Zheng Yan (13) commits (+4076/-2679):
> Btrfs: Integrate metadata reservation with start_transaction (+678/-528)
> Btrfs: Update metadata reservation for delayed allocation (+232/-415)
> Btrfs: Shrink delay allocated space in a synchronized (+88/-121)
> Btrfs: Introduce contexts for metadata reservation (+853/-385)
> Btrfs: Link block groups of different raid types (+121/-55)
> Btrfs: Metadata ENOSPC handling for balance (+1163/-747)
> Btrfs: Metadata ENOSPC handling for tree log (+156/-128)
> Btrfs: Metadata reservation for orphan inodes (+365/-66)
> Btrfs: Pre-allocate space for data relocation (+92/-45)
> Btrfs: Introduce global metadata reservation (+241/-76)
> Btrfs: Fix block generation verification race (+1/-1)
> Btrfs: Kill allocate_wait in space_info (+58/-76)
> Btrfs: Kill init_btrfs_i() (+28/-36)
>
> Chris Mason (9) commits (+314/-80):
> Btrfs: fix preallocation and nodatacow checks in O_DIRECT (+140/-16)
> Btrfs: move O_DIRECT space reservation to btrfs_direct_IO (+8/-6)
> Btrfs: don't walk around with task->state != TASK_RUNNING (+4/-3)
> Btrfs: use async helpers for DIO write checksumming (+52/-17)
> Btrfs: add more error checking to btrfs_dirty_inode (+13/-2)
> Btrfs: avoid ENOSPC errors in btrfs_dirty_inode (+11/-3)
> Btrfs: rework O_DIRECT enospc handling (+49/-30)
> Btrfs: drop verbose enospc printk (+2/-0)
> Btrfs: allow unaligned DIO (+35/-3)
>
> Josef Bacik (5) commits (+829/-134):
> direct-io: add a hook for the fs to provide its own submit_bio function (+45/-8)
> fs: allow short direct-io reads to be completed via buffered IO (+31/-5)
> direct-io: do not merge logically non-contiguous requests (+18/-2)
> Btrfs: add basic DIO read/write support (+631/-36)
> Btrfs: do aio_write instead of write (+104/-83)
>
> Total: (27) commits
>

In the following mail, You said that you had put the cleanups which Zhao Lei and I contributed
into a .35 queue, but I cannot find those patches have been merged into the .35 kernel...
http://marc.info/?l=linux-btrfs&m=127049622906168&w=2

Is there anything wrong with those patches?

Regards
Miao