14 Jun, 2013

2 commits

  • when user runs command btrfs dev del the raid requisite error if any
    goes to the /var/log/messages, its not good idea to clutter messages
    with these user (knowledge) errors, further user don't have to review
    the system messages to know problem with the cli it should be dropped
    to the user as part of the cli return.

    to bring this feature created a set of the ERROR defined
    BTRFS_ERROR_DEV* error codes and created their error string.

    I expect this enum to be added with other error which we might
    want to communicate to the user land

    v3:
    moved the code with in the file no logical change

    v1->v2:
    introduce error codes for the device mgmt usage

    v1:
    adds a parameter in the ioctl arg struct to carry the error string

    Signed-off-by: Anand Jain
    Signed-off-by: Josef Bacik

    Anand Jain
     
  • btrfs_qgroup_wait_for_completion waits until the currently running qgroup
    operation completes. It returns immediately when no rescan process is in
    progress. This is useful to automate things around the rescan process (e.g.
    testing).

    Signed-off-by: Jan Schmidt
    Signed-off-by: Josef Bacik

    Jan Schmidt
     

07 May, 2013

2 commits

  • If qgroup tracking is out of sync, a rescan operation can be started. It
    iterates the complete extent tree and recalculates all qgroup tracking data.
    This is an expensive operation and should not be used unless required.

    A filesystem under rescan can still be umounted. The rescan continues on the
    next mount. Status information is provided with a separate ioctl while a
    rescan operation is in progress.

    Signed-off-by: Jan Schmidt
    Signed-off-by: Josef Bacik

    Jan Schmidt
     
  • Two new flags are added to allow omitting the stream header and the
    end command for btrfs send streams. This is used in cases where you
    send multiple snapshots back-to-back in one stream.

    This used to be encoded like this (with 2 snapshots in this example):
    + + +
    + + + EOF

    The new format (if the two new flags are used) is this one:
    + +
    +

    Note that the currently existing receivers treat only as
    an indication that a new is following. This means,
    you can just skip the sequence without
    loosing compatibility. As long as an EOF is following, the currently
    existing receivers handle the new format (if the two new flags are
    used) exactly as the old one.

    So what is the benefit of this change? The goal is to be able to use
    a single stream (one TCP connection) to multiplex a request/response
    handshake plus Btrfs send streams, all in the same stream. In this
    case you cannot evaluate an EOF condition as an end of the Btrfs send
    stream. You need something else, and the is just perfect
    for this purpose.

    The summary is:
    The format change is driven by the need to send several Btrfs send
    streams over a single TCP connections, with the ability for a repeated
    request/response handshake in the middle. And this format change does
    not break any existing tool, it is completely compatible.

    You could compare the old behaviour of the Btrfs send stream to the
    one of ftp where you need a seperate request/response channel and
    newly opened data transfer channels for each file, while the new
    behaviour is more like http using a single stream for everything.

    Signed-off-by: Stefan Behrens
    Signed-off-by: Josef Bacik

    Stefan Behrens
     

21 Feb, 2013

3 commits

  • With this new ioctl(2) BTRFS_IOC_SET_FSLABEL, we can set/change the label of a mounted file system.

    Signed-off-by: Jie Liu
    Signed-off-by: Anand Jain
    Reviewed-by: Miao Xie
    Reviewed-by: Goffredo Baroncelli
    Reviewed-by: David Sterba
    Reviewed-by: Goffredo Baroncelli
    Signed-off-by: Josef Bacik

    jeff.liu
     
  • Add a new ioctl(2) BTRFS_IOC_GET_FSLABLE, so that we can get the label upon a mounted filesystem.

    Signed-off-by: Jie Liu
    Signed-off-by: Anand Jain
    Cc: Miao Xie
    Cc: Goffredo Baroncelli
    Cc: David Sterba
    Signed-off-by: Josef Bacik

    jeff.liu
     
  • This patch adds the flag, BTRFS_SEND_FLAG_NO_FILE_DATA to the btrfs send
    ioctl code. When this flag is set, the btrfs send code will never write file
    data into the stream (thus also avoiding expensive reads of that data in the
    first place). BTRFS_SEND_C_UPDATE_EXTENT commands will be sent (instead of
    BTRFS_SEND_C_WRITE) with an offset, length pair indicating the extent in
    question.

    This patch does not affect the operation of BTRFS_SEND_C_CLONE commands -
    they will continue to be sent when a search finds an appropriate extent to
    clone from.

    Signed-off-by: Mark Fasheh
    Signed-off-by: Josef Bacik

    Mark Fasheh
     

20 Feb, 2013

1 commit