Btrfs: add SNAP_CREATE_ASYNC ioctl
authorSage Weil <sage@newdream.net>
Fri, 29 Oct 2010 19:41:32 +0000 (15:41 -0400)
committerChris Mason <chris.mason@oracle.com>
Sat, 30 Oct 2010 01:41:57 +0000 (21:41 -0400)
commit72fd032e94240d001b1d22f2c1dfd2592b02e44e
tree7671ea5585f79a8cecc9708e869aa37e24eb74de
parent462045928bda777c86919a396a42991fcf235378
Btrfs: add SNAP_CREATE_ASYNC ioctl

Create a snap without waiting for it to commit to disk.  The ioctl is
ordered such that subsequent operations will not be contained by the
created snapshot, and the commit is initiated, but the ioctl does not
wait for the snapshot to commit to disk.

We return the specific transid to userspace so that an application can wait
for this specific snapshot creation to commit via the WAIT_SYNC ioctl.

Signed-off-by: Sage Weil <sage@newdream.net>
Signed-off-by: Chris Mason <chris.mason@oracle.com>
fs/btrfs/ioctl.c
fs/btrfs/ioctl.h