17 Jan, 2009

1 commit

  • The structure used to send device in btrfs ioctl calls was not
    properly aligned, and so 32 bit ioctls would not work properly on
    64 bit kernels.

    We could fix this with compat ioctls, but we're just one byte away
    and it doesn't make sense at this stage to carry about the compat ioctls
    forever at this stage in the project.

    This patch brings the ioctl arg up to an evenly aligned 4k.

    Signed-off-by: Chris Mason

    Chris Mason
     

18 Nov, 2008

1 commit

  • Before, all snapshots and subvolumes lived in a single flat directory. This
    was awkward and confusing because the single flat directory was only writable
    with the ioctls.

    This commit changes the ioctls to create subvols and snapshots at any
    point in the directory tree. This requires making separate ioctls for
    snapshot and subvol creation instead of a combining them into one.

    The subvol ioctl does:

    btrfsctl -S subvol_name parent_dir

    After the ioctl is done subvol_name lives inside parent_dir.

    The snapshot ioctl does:

    btrfsctl -s path_for_snapshot root_to_snapshot

    path_for_snapshot can be an absolute or relative path. btrfsctl breaks it up
    into directory and basename components.

    root_to_snapshot can be any file or directory in the FS. The snapshot
    is taken of the entire root where that file lives.

    Signed-off-by: Chris Mason

    Chris Mason
     

13 Nov, 2008

1 commit

  • This patch adds an additional CLONE_RANGE ioctl to clone an arbitrary
    (block-aligned) file range to another file. The original CLONE ioctl
    becomes a special case of cloning the entire file range. The logic is a
    bit more complex now since ranges may be cloned to different offsets, and
    because we may only be cloning the beginning or end of a particular extent
    or checksum item.

    An additional sanity check ensures the source and destination files aren't
    the same (which would previously deadlock), although eventually this could
    be extended to allow the duplication of file data at a different offset
    within the same file.

    Any extents within the destination range in the target file are dropped.

    We currently do not cope with the case where a compressed inline extent
    needs to be split. This will probably require decompressing the extent
    into a temporary address_space, and inserting just the cloned portion as a
    new compressed inline extent. For now, just return -EINVAL in this case.
    Note that this never comes up in the more common case of cloning an entire
    file.

    Signed-off-by: Chris Mason

    Sage Weil
     

25 Sep, 2008

5 commits


08 Aug, 2007

1 commit


12 Jun, 2007

1 commit


12 Apr, 2007

1 commit


10 Apr, 2007

1 commit