Package: release.debian.org Severity: normal User: [email protected] Usertags: unblock
Please unblock package lio-utils. I have uploaded the package to unstable This unblock request is for a fix that has been committed and notified by upstream. Justification is: This patch fixes a bug in fd_get_params() where FILEIO buffered enabled mode was not being saved across reboots in /etc/target/tcm_start.sh, causing FILEIO devices created with buffered=true to revert to O_DSYNC mode. http://www.risingtidesystems.com/git/?p=lio-utils.git;a=commitdiff;h=5d0f4829aa130619e81edad3fe0aaa697fa00be4 debdiff attached. unblock lio-utils/3.1+git2.fd0b34fd-2 -- System Information: Debian Release: 7.0 APT prefers unstable APT policy: (500, 'unstable'), (500, 'testing'), (101, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 3.8-trunk-amd64 (SMP w/8 CPU cores) Locale: LANG=en_IN, LC_CTYPE=en_IN (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff -Nru lio-utils-3.1+git2.fd0b34fd/debian/changelog lio-utils-3.1+git2.fd0b34fd/debian/changelog --- lio-utils-3.1+git2.fd0b34fd/debian/changelog 2012-05-15 17:57:08.000000000 +0530 +++ lio-utils-3.1+git2.fd0b34fd/debian/changelog 2013-03-25 21:07:34.000000000 +0530 @@ -1,3 +1,10 @@ +lio-utils (3.1+git2.fd0b34fd-2) unstable; urgency=low + + * [5a3076c] Pick patch from upstream to set buffered io persistent + across reboots. Thanks to Nicholas Bellinger + + -- Ritesh Raj Sarraf <[email protected]> Mon, 25 Mar 2013 21:06:14 +0530 + lio-utils (3.1+git2.fd0b34fd-1) unstable; urgency=low * [2dcd774] Add README.source diff -Nru lio-utils-3.1+git2.fd0b34fd/debian/patches/series lio-utils-3.1+git2.fd0b34fd/debian/patches/series --- lio-utils-3.1+git2.fd0b34fd/debian/patches/series 2012-05-15 17:57:08.000000000 +0530 +++ lio-utils-3.1+git2.fd0b34fd/debian/patches/series 2013-03-25 21:07:34.000000000 +0530 @@ -1,2 +1,3 @@ +tcm-file-Set-fd_buffered_io-1-based-upon-active-FILE.patch shell-script-header.patch initscript.patch diff -Nru lio-utils-3.1+git2.fd0b34fd/debian/patches/tcm-file-Set-fd_buffered_io-1-based-upon-active-FILE.patch lio-utils-3.1+git2.fd0b34fd/debian/patches/tcm-file-Set-fd_buffered_io-1-based-upon-active-FILE.patch --- lio-utils-3.1+git2.fd0b34fd/debian/patches/tcm-file-Set-fd_buffered_io-1-based-upon-active-FILE.patch 1970-01-01 05:30:00.000000000 +0530 +++ lio-utils-3.1+git2.fd0b34fd/debian/patches/tcm-file-Set-fd_buffered_io-1-based-upon-active-FILE.patch 2013-03-25 21:07:34.000000000 +0530 @@ -0,0 +1,80 @@ +From 5d0f4829aa130619e81edad3fe0aaa697fa00be4 Mon Sep 17 00:00:00 2001 +From: Nicholas Bellinger <[email protected]> +Date: Thu, 31 Jan 2013 11:54:05 -0800 +Subject: [PATCH 1/2] tcm-file: Set fd_buffered_io=1 based upon active FILEIO + mode + +This patch fixes a bug in fd_get_params() where FILEIO buffered enabled mode +was not being saved across reboots in /etc/target/tcm_start.sh, causing +FILEIO devices created with buffered=true to revert to O_DSYNC mode. + +Signed-off-by: Nicholas Bellinger <[email protected]> +Signed-off-by: Ritesh Raj Sarraf <[email protected]> +--- + tcm-py/tcm_fileio.py | 30 ++++++++++++++++++++++++++---- + 1 file changed, 26 insertions(+), 4 deletions(-) + +diff --git a/tcm-py/tcm_fileio.py b/tcm-py/tcm_fileio.py +index c130bc6..7429844 100755 +--- a/tcm-py/tcm_fileio.py ++++ b/tcm-py/tcm_fileio.py +@@ -50,15 +50,29 @@ def createvirtdev(path, params): + def fd_freevirtdev(): + pass + ++def fd_get_buffered_mode(value): ++ ++ off = value.index(' Mode: ') ++ off += 7 ++ fd_dev_mode_tmp = value[off:] ++ fd_dev_mode = fd_dev_mode_tmp.split(' ') ++ if re.search('Buffered', fd_dev_mode[0]): ++ fd_dev_mode_str = ",fd_buffered_io=1" ++ else: ++ fd_dev_mode_str = "" ++ ++ return fd_dev_mode_str ++ + def fd_get_params(path): + # Reference by udev_path if available + udev_path_file = path + "/udev_path" + p = os.open(udev_path_file, 0) + value = os.read(p, 1024) + if re.search('/dev/', value): +- os.close(p) +- # Append a FILEIO size of ' 0', as struct block_device sector count is autodetected by TCM +- return "fd_dev_name=" + value.rstrip() + ",fd_dev_size=0" ++ fd_dev_blockdev = 1 ++ fd_dev_blockdev_str = "fd_dev_name=" + value.rstrip() + ",fd_dev_size=0" ++ else: ++ fd_dev_blockdev = 0 + + os.close(p) + +@@ -71,6 +85,11 @@ def fd_get_params(path): + return + p.close() + ++ if fd_dev_blockdev: ++ fd_dev_mode_str = fd_get_buffered_mode(value) ++ # Append a FILEIO size of ' 0', as struct block_device sector count is autodetected by TCM ++ return fd_dev_blockdev_str + fd_dev_mode_str ++ + off = value.index('File: ') + off += 6 + fd_dev_name_tmp = value[off:] +@@ -79,7 +98,10 @@ def fd_get_params(path): + off += 7 + fd_dev_size_tmp = value[off:] + fd_dev_size = fd_dev_size_tmp.split(' ') +- params = "fd_dev_name=" + fd_dev_name[0] + ",fd_dev_size=" + fd_dev_size[0] ++ ++ fd_dev_mode_str = fd_get_buffered_mode(value) ++ ++ params = "fd_dev_name=" + fd_dev_name[0] + ",fd_dev_size=" + fd_dev_size[0] + fd_dev_mode_str + + # fd_dev_name= and fd_dev_size= parameters for tcm_node --createdev + return params +-- +1.7.10.4 +

