Details
-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
None
-
3
-
9223372036854775807
Description
It is possible to insert duplicate HSM requests in the actions list:
# cd /mnt/lustre # cp /bin/ls . # cp /bin/ls ls2 # lfs hsm_archive ls2 ls2 ls2 ls2 # cat /proc/fs/lustre/mdt/lustre-MDT0000/hsm/actions lrh=[type=10680000 len=136 idx=1/2] fid=[0x200000401:0x2:0x0] dfid=[0x200000401:0x2:0x0] compound/cookie=0x571142b4/0x571142af action=ARCHIVE archive#=1 flags=0x0 extent=0x0-0xffffffffffffffff gid=0x0 datalen=0 status=WAITING data=[] lrh=[type=10680000 len=136 idx=1/3] fid=[0x200000401:0x2:0x0] dfid=[0x200000401:0x2:0x0] compound/cookie=0x571142b4/0x571142b0 action=ARCHIVE archive#=1 flags=0x0 extent=0x0-0xffffffffffffffff gid=0x0 datalen=0 status=WAITING data=[] lrh=[type=10680000 len=136 idx=1/4] fid=[0x200000401:0x2:0x0] dfid=[0x200000401:0x2:0x0] compound/cookie=0x571142b4/0x571142b1 action=ARCHIVE archive#=1 flags=0x0 extent=0x0-0xffffffffffffffff gid=0x0 datalen=0 status=WAITING data=[] lrh=[type=10680000 len=136 idx=1/5] fid=[0x200000401:0x2:0x0] dfid=[0x200000401:0x2:0x0] compound/cookie=0x571142b4/0x571142b2 action=ARCHIVE archive#=1 flags=0x0 extent=0x0-0xffffffffffffffff gid=0x0 datalen=0 status=WAITING data=[]
The copytool then successfully archives the same file 4 times.
The bug likely comes from mdt_hsm_add_actions() where duplicates are searched for between the already queued actions and the new ones in the HAL, but not between the actions in the HAL itself.