kernel-hacking-2024-linux-s.../include
Paul Clements a336d29870 nbd: handle discard requests
Add discard support to nbd.  If the nbd-server supports discard, it will
send NBD_FLAG_SEND_TRIM to the client.  The client will then set the flag
in the kernel via NBD_SET_FLAGS, which tells the kernel to enable discards
for the device (QUEUE_FLAG_DISCARD).

If discard support is enabled, then when the nbd client system receives a
discard request, this will be passed along to the nbd-server.  When the
discard request is received by the nbd-server, it will perform:

	fallocate(.. FALLOC_FL_PUNCH_HOLE ..)

To punch a hole in the backend storage, which is no longer needed.

Signed-off-by: Paul Clements <paul.clements@steeleye.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-10-06 03:05:24 +09:00
..
acpi Prepared for main script 2012-10-03 13:45:43 -07:00
asm-generic bitops: introduce generic {clear,set}_bit_le() 2012-10-06 03:04:55 +09:00
clocksource
crypto
drm Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2012-10-03 23:29:23 -07:00
keys
linux nbd: handle discard requests 2012-10-06 03:05:24 +09:00
math-emu
media
memory
misc
mtd
net sections: fix section conflicts in net 2012-10-06 03:04:45 +09:00
pcmcia
ras
rdma
rxrpc
scsi Prepared for main script 2012-10-03 13:45:43 -07:00
sound
target
trace
uapi
video
xen Prepared for main script 2012-10-03 13:45:43 -07:00
Kbuild