forked from Minki/linux
35a891be96
< XFS has gained super CoW powers! > ---------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || Included in this update: - unshare range (FALLOC_FL_UNSHARE) support for fallocate - copy-on-write extent size hints (FS_XFLAG_COWEXTSIZE) for fsxattr interface - shared extent support for XFS - copy-on-write support for shared extents - copy_file_range support - clone_file_range support (implements reflink) - dedupe_file_range support - defrag support for reverse mapping enabled filesystems -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJX/hrZAAoJEK3oKUf0dfodpwcQAKkTerNPhhDcthqWUJ2+jC7w JIuhKUg2GYojJhIJ4+Ue1knmuBeIusda+PzGls+6gdy7GDGdux/esRIJSe1W7A5G RNeumiSKVX5iYsZNUEX35O2a/SwUM1Sm5mcIFs4CxUwIRwE/cayNby6vrlVExvz7 Ns6YYOI2bldUHLsxedg8MLG0it1JGTADB9gwGgb98bxQ3bD/UBn3TF9xTlj+ZH22 ebnWsogSJOnUigOOSGeaQsmy1pJAhRIhvt+f481KuZak1pdQcK2feL4RcKw0NpNt 15LCYRqX6RexC684VYgJZxXB4EKyfS2Bma71q41A7dz1x36kw7+wG18xasBqU++p GZwwL6si02rIGPMz1oD8xxZ0F97ADCGRmkgUHsCJKbP5UmGiP08K6GEN3osr5hAN xAmn9AxcprXVnV3WmnFxpBeWY/qCEsvSQqJuKSThYqAilqUc8wN2u5g/eEpE6mmg KEEhzaq5P4ovS/HOIQJWdBu1j5E9Mg2o/ncy87Q6uE+9Fa5AAP6GBWOtGcMwdFSU adbN7dqjgoHMyNHFrmePqyJYtOZ2hZovDlVndxnYysl5ZBfiBEEDISmr+x6KcSlo 3kyOltYQLjEVu1sLOT3COCddn0jt5Lr1QhGeVepnrMlU2E1h4461viCNMDinJRIp OYoMOS+J83G2FEFwgXYM =Sa+Y -----END PGP SIGNATURE----- Merge tag 'xfs-reflink-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs < XFS has gained super CoW powers! > ---------------------------------- \ ^__^ \ (oo)\_______ (__)\ )\/\ ||----w | || || Pull XFS support for shared data extents from Dave Chinner: "This is the second part of the XFS updates for this merge cycle. This pullreq contains the new shared data extents feature for XFS. Given the complexity and size of this change I am expecting - like the addition of reverse mapping last cycle - that there will be some follow-up bug fixes and cleanups around the -rc3 stage for issues that I'm sure will show up once the code hits a wider userbase. What it is: At the most basic level we are simply adding shared data extents to XFS - i.e. a single extent on disk can now have multiple owners. To do this we have to add new on-disk features to both track the shared extents and the number of times they've been shared. This is done by the new "refcount" btree that sits in every allocation group. When we share or unshare an extent, this tree gets updated. Along with this new tree, the reverse mapping tree needs to be updated to track each owner or a shared extent. This also needs to be updated ever share/unshare operation. These interactions at extent allocation and freeing time have complex ordering and recovery constraints, so there's a significant amount of new intent-based transaction code to ensure that operations are performed atomically from both the runtime and integrity/crash recovery perspectives. We also need to break sharing when writes hit a shared extent - this is where the new copy-on-write implementation comes in. We allocate new storage and copy the original data along with the overwrite data into the new location. We only do this for data as we don't share metadata at all - each inode has it's own metadata that tracks the shared data extents, the extents undergoing CoW and it's own private extents. Of course, being XFS, nothing is simple - we use delayed allocation for CoW similar to how we use it for normal writes. ENOSPC is a significant issue here - we build on the reservation code added in 4.8-rc1 with the reverse mapping feature to ensure we don't get spurious ENOSPC issues part way through a CoW operation. These mechanisms also help minimise fragmentation due to repeated CoW operations. To further reduce fragmentation overhead, we've also introduced a CoW extent size hint, which indicates how large a region we should allocate when we execute a CoW operation. With all this functionality in place, we can hook up .copy_file_range, .clone_file_range and .dedupe_file_range and we gain all the capabilities of reflink and other vfs provided functionality that enable manipulation to shared extents. We also added a fallocate mode that explicitly unshares a range of a file, which we implemented as an explicit CoW of all the shared extents in a file. As such, it's a huge chunk of new functionality with new on-disk format features and internal infrastructure. It warns at mount time as an experimental feature and that it may eat data (as we do with all new on-disk features until they stabilise). We have not released userspace suport for it yet - userspace support currently requires download from Darrick's xfsprogs repo and build from source, so the access to this feature is really developer/tester only at this point. Initial userspace support will be released at the same time the kernel with this code in it is released. The new code causes 5-6 new failures with xfstests - these aren't serious functional failures but things the output of tests changing slightly due to perturbations in layouts, space usage, etc. OTOH, we've added 150+ new tests to xfstests that specifically exercise this new functionality so it's got far better test coverage than any functionality we've previously added to XFS. Darrick has done a pretty amazing job getting us to this stage, and special mention also needs to go to Christoph (review, testing, improvements and bug fixes) and Brian (caught several intricate bugs during review) for the effort they've also put in. Summary: - unshare range (FALLOC_FL_UNSHARE) support for fallocate - copy-on-write extent size hints (FS_XFLAG_COWEXTSIZE) for fsxattr interface - shared extent support for XFS - copy-on-write support for shared extents - copy_file_range support - clone_file_range support (implements reflink) - dedupe_file_range support - defrag support for reverse mapping enabled filesystems" * tag 'xfs-reflink-for-linus-4.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: (71 commits) xfs: convert COW blocks to real blocks before unwritten extent conversion xfs: rework refcount cow recovery error handling xfs: clear reflink flag if setting realtime flag xfs: fix error initialization xfs: fix label inaccuracies xfs: remove isize check from unshare operation xfs: reduce stack usage of _reflink_clear_inode_flag xfs: check inode reflink flag before calling reflink functions xfs: implement swapext for rmap filesystems xfs: refactor swapext code xfs: various swapext cleanups xfs: recognize the reflink feature bit xfs: simulate per-AG reservations being critically low xfs: don't mix reflink and DAX mode for now xfs: check for invalid inode reflink flags xfs: set a default CoW extent size of 32 blocks xfs: convert unwritten status of reverse mappings for shared files xfs: use interval query for rmap alloc operations on shared files xfs: add shared rmap map/unmap/convert log item types xfs: increase log reservations for reflink ... |
||
---|---|---|
.. | ||
android | ||
byteorder | ||
caif | ||
can | ||
cifs | ||
dvb | ||
genwqe | ||
hdlc | ||
hsi | ||
iio | ||
isdn | ||
mmc | ||
netfilter | ||
netfilter_arp | ||
netfilter_bridge | ||
netfilter_ipv4 | ||
netfilter_ipv6 | ||
nfsd | ||
raid | ||
spi | ||
sunrpc | ||
tc_act | ||
tc_ematch | ||
usb | ||
wimax | ||
a.out.h | ||
acct.h | ||
adb.h | ||
adfs_fs.h | ||
affs_hardblocks.h | ||
agpgart.h | ||
aio_abi.h | ||
am437x-vpfe.h | ||
apm_bios.h | ||
arcfb.h | ||
atalk.h | ||
atm_eni.h | ||
atm_he.h | ||
atm_idt77105.h | ||
atm_nicstar.h | ||
atm_tcp.h | ||
atm_zatm.h | ||
atm.h | ||
atmapi.h | ||
atmarp.h | ||
atmbr2684.h | ||
atmclip.h | ||
atmdev.h | ||
atmioc.h | ||
atmlec.h | ||
atmmpc.h | ||
atmppp.h | ||
atmsap.h | ||
atmsvc.h | ||
audit.h | ||
auto_dev-ioctl.h | ||
auto_fs4.h | ||
auto_fs.h | ||
auxvec.h | ||
ax25.h | ||
b1lli.h | ||
batman_adv.h | ||
baycom.h | ||
bcache.h | ||
bcm933xx_hcs.h | ||
bfs_fs.h | ||
binfmts.h | ||
blkpg.h | ||
blktrace_api.h | ||
bpf_common.h | ||
bpf_perf_event.h | ||
bpf.h | ||
bpqether.h | ||
bsg.h | ||
btrfs_tree.h | ||
btrfs.h | ||
can.h | ||
capability.h | ||
capi.h | ||
cciss_defs.h | ||
cciss_ioctl.h | ||
cdrom.h | ||
cgroupstats.h | ||
chio.h | ||
cm4000_cs.h | ||
cn_proc.h | ||
coda_psdev.h | ||
coda.h | ||
coff.h | ||
connector.h | ||
const.h | ||
coresight-stm.h | ||
cramfs_fs.h | ||
cryptouser.h | ||
cuda.h | ||
cyclades.h | ||
cycx_cfm.h | ||
dcbnl.h | ||
dccp.h | ||
devlink.h | ||
dlm_device.h | ||
dlm_netlink.h | ||
dlm_plock.h | ||
dlm.h | ||
dlmconstants.h | ||
dm-ioctl.h | ||
dm-log-userspace.h | ||
dma-buf.h | ||
dn.h | ||
dqblk_xfs.h | ||
edd.h | ||
efs_fs_sb.h | ||
elf-em.h | ||
elf-fdpic.h | ||
elf.h | ||
elfcore.h | ||
errno.h | ||
errqueue.h | ||
ethtool.h | ||
eventpoll.h | ||
fadvise.h | ||
falloc.h | ||
fanotify.h | ||
fb.h | ||
fcntl.h | ||
fd.h | ||
fdreg.h | ||
fib_rules.h | ||
fiemap.h | ||
filter.h | ||
firewire-cdev.h | ||
firewire-constants.h | ||
flat.h | ||
fou.h | ||
fs.h | ||
fsl_hypervisor.h | ||
fuse.h | ||
futex.h | ||
gameport.h | ||
gen_stats.h | ||
genetlink.h | ||
gfs2_ondisk.h | ||
gigaset_dev.h | ||
gpio.h | ||
gsmmux.h | ||
gtp.h | ||
hash_info.h | ||
hdlc.h | ||
hdlcdrv.h | ||
hdreg.h | ||
hid.h | ||
hiddev.h | ||
hidraw.h | ||
hpet.h | ||
hsr_netlink.h | ||
hw_breakpoint.h | ||
hyperv.h | ||
hysdn_if.h | ||
i2c-dev.h | ||
i2c.h | ||
i2o-dev.h | ||
i8k.h | ||
icmp.h | ||
icmpv6.h | ||
if_addr.h | ||
if_addrlabel.h | ||
if_alg.h | ||
if_arcnet.h | ||
if_arp.h | ||
if_bonding.h | ||
if_bridge.h | ||
if_cablemodem.h | ||
if_eql.h | ||
if_ether.h | ||
if_fc.h | ||
if_fddi.h | ||
if_frad.h | ||
if_hippi.h | ||
if_infiniband.h | ||
if_link.h | ||
if_ltalk.h | ||
if_macsec.h | ||
if_packet.h | ||
if_phonet.h | ||
if_plip.h | ||
if_ppp.h | ||
if_pppol2tp.h | ||
if_pppox.h | ||
if_slip.h | ||
if_team.h | ||
if_tun.h | ||
if_tunnel.h | ||
if_vlan.h | ||
if_x25.h | ||
if.h | ||
igmp.h | ||
ila.h | ||
in6.h | ||
in_route.h | ||
in.h | ||
inet_diag.h | ||
inotify.h | ||
input-event-codes.h | ||
input.h | ||
ioctl.h | ||
ip6_tunnel.h | ||
ip_vs.h | ||
ip.h | ||
ipc.h | ||
ipmi_msgdefs.h | ||
ipmi.h | ||
ipsec.h | ||
ipv6_route.h | ||
ipv6.h | ||
ipx.h | ||
irda.h | ||
irqnr.h | ||
isdn_divertif.h | ||
isdn_ppp.h | ||
isdn.h | ||
isdnif.h | ||
iso_fs.h | ||
ivtv.h | ||
ivtvfb.h | ||
ixjuser.h | ||
jffs2.h | ||
joystick.h | ||
Kbuild | ||
kcm.h | ||
kcmp.h | ||
kcov.h | ||
kd.h | ||
kdev_t.h | ||
kernel-page-flags.h | ||
kernel.h | ||
kernelcapi.h | ||
kexec.h | ||
keyboard.h | ||
keyctl.h | ||
kfd_ioctl.h | ||
kvm_para.h | ||
kvm.h | ||
l2tp.h | ||
libc-compat.h | ||
lightnvm.h | ||
limits.h | ||
lirc.h | ||
llc.h | ||
loop.h | ||
lp.h | ||
lwtunnel.h | ||
magic.h | ||
major.h | ||
map_to_7segment.h | ||
matroxfb.h | ||
mdio.h | ||
media-bus-format.h | ||
media.h | ||
mei.h | ||
membarrier.h | ||
memfd.h | ||
mempolicy.h | ||
meye.h | ||
mic_common.h | ||
mic_ioctl.h | ||
mii.h | ||
minix_fs.h | ||
mman.h | ||
mmtimer.h | ||
module.h | ||
mpls_iptunnel.h | ||
mpls.h | ||
mqueue.h | ||
mroute6.h | ||
mroute.h | ||
msdos_fs.h | ||
msg.h | ||
mtio.h | ||
n_r3964.h | ||
nbd.h | ||
ncp_fs.h | ||
ncp_mount.h | ||
ncp_no.h | ||
ncp.h | ||
ndctl.h | ||
neighbour.h | ||
net_dropmon.h | ||
net_namespace.h | ||
net_tstamp.h | ||
net.h | ||
netconf.h | ||
netdevice.h | ||
netfilter_arp.h | ||
netfilter_bridge.h | ||
netfilter_decnet.h | ||
netfilter_ipv4.h | ||
netfilter_ipv6.h | ||
netfilter.h | ||
netlink_diag.h | ||
netlink.h | ||
netrom.h | ||
nfc.h | ||
nfs2.h | ||
nfs3.h | ||
nfs4_mount.h | ||
nfs4.h | ||
nfs_fs.h | ||
nfs_idmap.h | ||
nfs_mount.h | ||
nfs.h | ||
nfsacl.h | ||
nilfs2_api.h | ||
nilfs2_ondisk.h | ||
nl80211.h | ||
nsfs.h | ||
nubus.h | ||
nvme_ioctl.h | ||
nvram.h | ||
omap3isp.h | ||
omapfb.h | ||
oom.h | ||
openvswitch.h | ||
packet_diag.h | ||
param.h | ||
parport.h | ||
patchkey.h | ||
pci_regs.h | ||
pci.h | ||
perf_event.h | ||
personality.h | ||
pfkeyv2.h | ||
pg.h | ||
phantom.h | ||
phonet.h | ||
pkt_cls.h | ||
pkt_sched.h | ||
pktcdvd.h | ||
pmu.h | ||
poll.h | ||
posix_acl_xattr.h | ||
posix_acl.h | ||
posix_types.h | ||
ppdev.h | ||
ppp_defs.h | ||
ppp-comp.h | ||
ppp-ioctl.h | ||
pps.h | ||
pr.h | ||
prctl.h | ||
psci.h | ||
ptp_clock.h | ||
ptrace.h | ||
qnx4_fs.h | ||
qnxtypes.h | ||
qrtr.h | ||
quota.h | ||
radeonfb.h | ||
random.h | ||
raw.h | ||
rds.h | ||
reboot.h | ||
reiserfs_fs.h | ||
reiserfs_xattr.h | ||
resource.h | ||
rfkill.h | ||
rio_cm_cdev.h | ||
rio_mport_cdev.h | ||
romfs_fs.h | ||
rose.h | ||
route.h | ||
rtc.h | ||
rtnetlink.h | ||
scc.h | ||
sched.h | ||
scif_ioctl.h | ||
screen_info.h | ||
sctp.h | ||
sdla.h | ||
seccomp.h | ||
securebits.h | ||
selinux_netlink.h | ||
sem.h | ||
serial_core.h | ||
serial_reg.h | ||
serial.h | ||
serio.h | ||
shm.h | ||
signal.h | ||
signalfd.h | ||
smiapp.h | ||
snmp.h | ||
sock_diag.h | ||
socket.h | ||
sockios.h | ||
sonet.h | ||
sonypi.h | ||
sound.h | ||
soundcard.h | ||
stat.h | ||
stddef.h | ||
stm.h | ||
string.h | ||
suspend_ioctls.h | ||
swab.h | ||
sync_file.h | ||
synclink.h | ||
sysctl.h | ||
sysinfo.h | ||
target_core_user.h | ||
taskstats.h | ||
tcp_metrics.h | ||
tcp.h | ||
telephony.h | ||
termios.h | ||
thermal.h | ||
time.h | ||
times.h | ||
timex.h | ||
tiocl.h | ||
tipc_config.h | ||
tipc_netlink.h | ||
tipc.h | ||
toshiba.h | ||
tty_flags.h | ||
tty.h | ||
types.h | ||
udf_fs_i.h | ||
udp.h | ||
uhid.h | ||
uinput.h | ||
uio.h | ||
ultrasound.h | ||
un.h | ||
unistd.h | ||
unix_diag.h | ||
usbdevice_fs.h | ||
usbip.h | ||
userfaultfd.h | ||
userio.h | ||
utime.h | ||
utsname.h | ||
uuid.h | ||
uvcvideo.h | ||
v4l2-common.h | ||
v4l2-controls.h | ||
v4l2-dv-timings.h | ||
v4l2-mediabus.h | ||
v4l2-subdev.h | ||
veth.h | ||
vfio.h | ||
vhost.h | ||
videodev2.h | ||
virtio_9p.h | ||
virtio_balloon.h | ||
virtio_blk.h | ||
virtio_config.h | ||
virtio_console.h | ||
virtio_gpu.h | ||
virtio_ids.h | ||
virtio_input.h | ||
virtio_net.h | ||
virtio_pci.h | ||
virtio_ring.h | ||
virtio_rng.h | ||
virtio_scsi.h | ||
virtio_types.h | ||
virtio_vsock.h | ||
vm_sockets.h | ||
vt.h | ||
vtpm_proxy.h | ||
wait.h | ||
wanrouter.h | ||
watchdog.h | ||
wil6210_uapi.h | ||
wimax.h | ||
wireless.h | ||
x25.h | ||
xattr.h | ||
xfrm.h | ||
xilinx-v4l2-controls.h | ||
zorro_ids.h | ||
zorro.h |