Whamcloud - gitweb
LU-3642 seq: make seq_proc_write_common() safer 23/7123/3
authorAndreas Dilger <andreas.dilger@intel.com>
Thu, 25 Jul 2013 22:27:41 +0000 (16:27 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 26 Sep 2013 04:42:23 +0000 (04:42 +0000)
commit05f69f5ee20eeffcc26f643333cedcfb53ba6669
tree9e35f2ae81d250e55f588c13307efa617fbadea1
parentd0b3e251ad5d5e86c49082ca8e1201118357ea65
LU-3642 seq: make seq_proc_write_common() safer

Don't allow seq_proc_write_common() to specify arbitrary ranges,
since this can permanently corrupt the sequence controller and/or
sequnece server.  That would allow duplicate FID allocation, or
possibly prevent any new files to be created or servers to be added
to the filesystem.

Instead, limit the sequence range that can be written via /proc to
a subset of the sequence range currently allocated to that node.
Add the "clear" keyword to allow dropping the entire local sequence
and force a new one to be fetched from the sequence server.

Signed-off-by: Andreas Dilger <andreas.dilger@intel.com>
Change-Id: I89da0223a52ce8bec787b1d5099402c84274291a
Reviewed-on: http://review.whamcloud.com/7123
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Tested-by: Hudson
Reviewed-by: James Simmons <uja.ornl@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/fid/lproc_fid.c
lustre/include/lustre/lustre_idl.h