linux/drivers/staging
Henri Doreau 0ffaa9c8eb staging: lustre: hsm: Use file lease to implement migration
Implement non-blocking migration based on exclusive open instead of
group lock. Implemented exclusive close operation to atomically put
a lease, swap two layouts and close a file. This allows race-free
migrations.

Make the caller responsible for retrying on failure (EBUSY, EAGAIN)
in non-blocking mode.

In blocking mode, allow applications to trigger layout swaps using a
grouplock they already own, to prevent race conditions between the
actual data copy and the layout swap. Updated lfs accordingly. File
leases are also taken in blocking mode, so that lfs migrate can issue
a warning if an application attempts to open a file that is being
migrated and gets blocked.

Timestamps (atime/mtime) are set from userland, after the layout swap
is performed, to prevent conflicts with the grouplock.

lli_trunc_sem is taken/released in the vvp_io layer, under the DLM
lock. This re-ordering fixes the original issue between truncate and
migrate.

Signed-off-by: Henri Doreau <henri.doreau@cea.fr>
Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com>
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4840
Reviewed-on: http://review.whamcloud.com/10013
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Reviewed-by: frank zago <fzago@cray.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: James Simmons <jsimmons@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-11-14 16:16:57 +01:00
..
android Merge 4.9-rc3 into staging-next 2016-10-30 06:38:44 -04:00
board
clocking-wizard staging: clocking-wizard: Fix incorrect type of speed grade 2016-10-25 09:54:32 +02:00
comedi Merge 4.9-rc5 into staging-next 2016-11-14 08:53:56 +01:00
dgnc staging: dgnc: re-arrange functions for removing forward declarations 2016-11-14 15:47:42 +01:00
emxx_udc Staging:emxx_udc:emxx_udc: Compression of lines for immediate return 2016-11-07 11:26:57 +01:00
fbtft staging: fbtft: Fix 'line over 80 characters' 2016-11-10 13:55:02 +01:00
fsl-mc Staging: fsl-mc: include: mc: Kernel type 's32' preferred over 'int32_t' 2016-11-14 15:51:15 +01:00
fwserial Staging: fwserial: remove unused function fill_unplug_req 2016-10-16 10:25:09 +02:00
gdm724x
goldfish
greybus Merge 4.9-rc5 into staging-next 2016-11-14 08:53:56 +01:00
gs_fpgaboot Staging: gs_fpgaboot: Use octal permissions '0444' 2016-10-25 09:40:44 +02:00
i4l staging: i4l: pcbit: remove duplicated include from capi.c 2016-10-25 09:59:48 +02:00
iio Second round of new device support, cleanups and fixes for IIO in the 4.10 cycle 2016-11-07 09:14:03 +01:00
ks7010 Staging: ks7010: Prefer using the BIT macro 2016-11-14 15:48:57 +01:00
lustre staging: lustre: hsm: Use file lease to implement migration 2016-11-14 16:16:57 +01:00
media Merge 4.9-rc5 into staging-next 2016-11-14 08:53:56 +01:00
most staging: most: hdm-usb: add comment 2016-10-30 11:09:02 -04:00
mt29f_spinand
netlogic Staging: netlogic: Compress return logic into one line 2016-10-16 10:27:33 +02:00
nvec staging: nvec: remove managed resource from PS2 driver 2016-11-07 11:48:25 +01:00
octeon
octeon-usb
olpc_dcon
rtl8188eu Staging: rtl8188eu: Fix code indention found by checkpatch. 2016-10-30 11:09:03 -04:00
rtl8192e staging: rtl8192e: Standardize test for NULL. 2016-10-30 11:09:03 -04:00
rtl8192u staging: rtl8192u: Standardize test for NULL. 2016-10-30 11:09:03 -04:00
rtl8712 staging : rtl8712: Free memory when kmalloc fails 2016-11-07 11:24:52 +01:00
rts5208 staging: rts5208: rtsx.c: Fix invalid use of sizeof in rtsx_probe() 2016-10-25 09:59:48 +02:00
skein Staging: skein: skein_api: Remove useless type conversion 2016-10-16 10:25:07 +02:00
slicoss staging: slicoss: replace memcpy_fromio with memcpy 2016-10-25 10:00:28 +02:00
sm750fb Merge 4.9-rc5 into staging-next 2016-11-14 08:53:56 +01:00
speakup Staging: speakup: Remove unnecessary space after cast 2016-11-07 10:50:35 +01:00
unisys staging: unisys: visorinput: Add default conditions to case statements 2016-11-07 10:56:39 +01:00
vc04_services staging: vc04_services: fix ifnullfree.cocci warnings 2016-11-14 15:38:42 +01:00
vme Revert "Staging: vme: Use BIT macro for bit field definitions." 2016-11-14 15:44:57 +01:00
vt6655 staging: vt6655: card.c: Fixing multiple assignments 2016-11-07 11:31:12 +01:00
vt6656 Staging:vt6656:main_usb: fix Block comments should align the * on each line 2016-10-25 10:56:17 +02:00
wilc1000 Merge 4.9-rc3 into staging-next 2016-10-30 06:38:44 -04:00
wlan-ng staging: wlan-ng: use GENMASK macro in different defines of hfa384x.h 2016-11-14 15:43:20 +01:00
xgifb Staging: xgifb: vgatypes: Replace decimal permissions with 4 digit octal 2016-11-10 13:55:03 +01:00
Kconfig
Makefile staging: vc04_services: use bcm2835 consequently 2016-10-27 15:23:54 +02:00