Patchwork [Maverick,1/1] UBUNTU: ubuntu: iscsitarget -- version 1.4.20.2

login
register
mail settings
Submitter Leann Ogasawara
Date Aug. 13, 2010, 3:07 p.m.
Message ID <1281712046.2405.261.camel@emiko>
Download mbox | patch
Permalink /patch/61686/
State Accepted
Delegated to: Leann Ogasawara
Headers show

Comments

Leann Ogasawara - Aug. 13, 2010, 3:07 p.m.
Hi All,

Per the Maverick Ubuntu Delta Review blueprint [1] one of the remaining
work items is to review the list of ubuntu/ drivers we're carrying and
update any if a newer version is available.  As a result, I've found
that iscsitarget has a newer 1.4.20.2 version available.  The following
patch brings us up to date with this latest version (we're currently
carrying 1.4.20.1).

Thanks,
Leann

[1] https://blueprints.launchpad.net/ubuntu/+spec/kernel-maverick-ubuntu-delta-review

>From 1c628cedb01fc0c7e19c19f0cb82663634d4f58f Mon Sep 17 00:00:00 2001
From: Leann Ogasawara <leann.ogasawara@canonical.com>
Date: Wed, 11 Aug 2010 11:02:38 -0700
Subject: [PATCH] UBUNTU: ubuntu: iscsitarget -- version 1.4.20.2

Update iscsitarget to the latest stable version (v1.4.20.2) from
sourceforge.

ExternalDriver: iscsi_trgt
Url: http://sourceforge.net/projects/iscsitarget/files/
Version: 1.4.20.2

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
---
 ubuntu/iscsitarget/BOM             |    4 ++--
 ubuntu/iscsitarget/block-io.c      |    4 ++--
 ubuntu/iscsitarget/compat.h        |   30 ++++++++++++++++++++++++++++++
 ubuntu/iscsitarget/file-io.c       |    2 +-
 ubuntu/iscsitarget/include/iet_u.h |    2 +-
 ubuntu/iscsitarget/iscsi.h         |    1 +
 ubuntu/iscsitarget/null-io.c       |    2 +-
 ubuntu/iscsitarget/ua.c            |    2 +-
 ubuntu/iscsitarget/volume.c        |    3 +--
 9 files changed, 40 insertions(+), 10 deletions(-)
 create mode 100644 ubuntu/iscsitarget/compat.h
Tim Gardner - Aug. 13, 2010, 4 p.m.
On 08/13/2010 08:07 AM, Leann Ogasawara wrote:
> Hi All,
>
> Per the Maverick Ubuntu Delta Review blueprint [1] one of the remaining
> work items is to review the list of ubuntu/ drivers we're carrying and
> update any if a newer version is available.  As a result, I've found
> that iscsitarget has a newer 1.4.20.2 version available.  The following
> patch brings us up to date with this latest version (we're currently
> carrying 1.4.20.1).
>
> Thanks,
> Leann
>
> [1] https://blueprints.launchpad.net/ubuntu/+spec/kernel-maverick-ubuntu-delta-review
>
>> From 1c628cedb01fc0c7e19c19f0cb82663634d4f58f Mon Sep 17 00:00:00 2001
> From: Leann Ogasawara<leann.ogasawara@canonical.com>
> Date: Wed, 11 Aug 2010 11:02:38 -0700
> Subject: [PATCH] UBUNTU: ubuntu: iscsitarget -- version 1.4.20.2
>
> Update iscsitarget to the latest stable version (v1.4.20.2) from
> sourceforge.
>
> ExternalDriver: iscsi_trgt
> Url: http://sourceforge.net/projects/iscsitarget/files/
> Version: 1.4.20.2
>
> Signed-off-by: Leann Ogasawara<leann.ogasawara@canonical.com>
> ---
>   ubuntu/iscsitarget/BOM             |    4 ++--
>   ubuntu/iscsitarget/block-io.c      |    4 ++--
>   ubuntu/iscsitarget/compat.h        |   30 ++++++++++++++++++++++++++++++
>   ubuntu/iscsitarget/file-io.c       |    2 +-
>   ubuntu/iscsitarget/include/iet_u.h |    2 +-
>   ubuntu/iscsitarget/iscsi.h         |    1 +
>   ubuntu/iscsitarget/null-io.c       |    2 +-
>   ubuntu/iscsitarget/ua.c            |    2 +-
>   ubuntu/iscsitarget/volume.c        |    3 +--
>   9 files changed, 40 insertions(+), 10 deletions(-)
>   create mode 100644 ubuntu/iscsitarget/compat.h
>
> diff --git a/ubuntu/iscsitarget/BOM b/ubuntu/iscsitarget/BOM
> index 0fde30c..40751ae 100644
> --- a/ubuntu/iscsitarget/BOM
> +++ b/ubuntu/iscsitarget/BOM
> @@ -1,2 +1,2 @@
> -Downloaded from:	svn://svn.berlios.de/iscsitarget/trunk
> -Current Version:	1.4.20.1
> +Downloaded from:	http://sourceforge.net/projects/iscsitarget/files/
> +Current Version:	1.4.20.2
> diff --git a/ubuntu/iscsitarget/block-io.c b/ubuntu/iscsitarget/block-io.c
> index 4de1d20..c812abf 100644
> --- a/ubuntu/iscsitarget/block-io.c
> +++ b/ubuntu/iscsitarget/block-io.c
> @@ -282,8 +282,8 @@ blockio_attach(struct iet_volume *volume, char *args)
>   		/* see Documentation/ABI/testing/sysfs-block */
>   		unsigned bsz = bdev_logical_block_size(bio_data->bdev);
>   		if (!volume->blk_shift)
> -			volume->blk_shift = ilog2(bsz);
> -		else if (volume->blk_shift<  ilog2(bsz)) {
> +			volume->blk_shift = blksize_bits(bsz);
> +		else if (volume->blk_shift<  blksize_bits(bsz)) {
>   			eprintk("Specified block size (%u) smaller than "
>   				"device %s logical block size (%u)\n",
>   				(1<<  volume->blk_shift), bio_data->path, bsz);
> diff --git a/ubuntu/iscsitarget/compat.h b/ubuntu/iscsitarget/compat.h
> new file mode 100644
> index 0000000..631a49c
> --- /dev/null
> +++ b/ubuntu/iscsitarget/compat.h
> @@ -0,0 +1,30 @@
> +/*
> + * Kernel compatibility routines
> + *
> + * Copyright (C) 2008 Ross Walker<rswwalker at gmail dot com>
> + *
> + * Released under the terms of the GNU GPL v2.0.
> + */
> +
> +#ifndef __IET_COMPAT_H__
> +#define __IET_COMPAT_H__
> +
> +#include<linux/version.h>
> +
> +#ifndef DECLARE_COMPLETION_ONSTACK
> +#define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
> +#endif
> +
> +#ifndef is_power_of_2
> +#define is_power_of_2(n) (n != 0&&  ((n&  (n - 1)) == 0))
> +#endif
> +
> +#ifndef log2
> +#define log2(n) ((sizeof(n)<= 4) ? (fls(n) - 1) : (fls64(n) - 1))
> +#endif
> +
> +#ifndef roundup_pow_of_two
> +#define roundup_pow_of_two(n) (1UL<<  fls_long(n - 1))
> +#endif
> +
> +#endif	/* __IET_COMPAT_H__ */
> diff --git a/ubuntu/iscsitarget/file-io.c b/ubuntu/iscsitarget/file-io.c
> index 38951a9..a050fcc 100644
> --- a/ubuntu/iscsitarget/file-io.c
> +++ b/ubuntu/iscsitarget/file-io.c
> @@ -232,7 +232,7 @@ static int fileio_attach(struct iet_volume *lu, char *args)
>   	}
>
>   	if (!lu->blk_shift)
> -		lu->blk_shift = ilog2(IET_DEF_BLOCK_SIZE);
> +		lu->blk_shift = blksize_bits(IET_DEF_BLOCK_SIZE);
>
>   	lu->blk_cnt = inode->i_size>>  lu->blk_shift;
>
> diff --git a/ubuntu/iscsitarget/include/iet_u.h b/ubuntu/iscsitarget/include/iet_u.h
> index 174f0dc..6fdc716 100644
> --- a/ubuntu/iscsitarget/include/iet_u.h
> +++ b/ubuntu/iscsitarget/include/iet_u.h
> @@ -1,7 +1,7 @@
>   #ifndef _IET_U_H
>   #define _IET_U_H
>
> -#define IET_VERSION_STRING	"1.4.20.1"
> +#define IET_VERSION_STRING	"1.4.20.2"
>
>   /* The maximum length of 223 bytes in the RFC. */
>   #define ISCSI_NAME_LEN	256
> diff --git a/ubuntu/iscsitarget/iscsi.h b/ubuntu/iscsitarget/iscsi.h
> index e9d37a4..9ded23a 100644
> --- a/ubuntu/iscsitarget/iscsi.h
> +++ b/ubuntu/iscsitarget/iscsi.h
> @@ -19,6 +19,7 @@
>
>   #include "iscsi_hdr.h"
>   #include "iet_u.h"
> +#include "compat.h"
>
>   #define IET_SENSE_BUF_SIZE      18
>
> diff --git a/ubuntu/iscsitarget/null-io.c b/ubuntu/iscsitarget/null-io.c
> index f64b18c..0b87507 100644
> --- a/ubuntu/iscsitarget/null-io.c
> +++ b/ubuntu/iscsitarget/null-io.c
> @@ -78,7 +78,7 @@ static int nullio_attach(struct iet_volume *lu, char *args)
>   	}
>
>   	if (!lu->blk_shift)
> -		lu->blk_shift = ilog2(IET_DEF_BLOCK_SIZE);
> +		lu->blk_shift = blksize_bits(IET_DEF_BLOCK_SIZE);
>
>   	/* defaults to 64 GiB */
>   	if (!lu->blk_cnt)
> diff --git a/ubuntu/iscsitarget/ua.c b/ubuntu/iscsitarget/ua.c
> index c4ba4c2..97f1ba0 100644
> --- a/ubuntu/iscsitarget/ua.c
> +++ b/ubuntu/iscsitarget/ua.c
> @@ -108,7 +108,7 @@ void ua_establish_for_session(struct iscsi_session *sess, u32 lun,
>   			      u8 asc, u8 ascq)
>   {
>   	struct list_head *l =&sess->ua_hash[ua_hashfn(lun)];
> -	struct ua_entry *ua = kmem_cache_alloc(ua_cache, GFP_KERNEL);
> +	struct ua_entry *ua = kmem_cache_alloc(ua_cache, GFP_ATOMIC);
>   	struct ua_entry *e;
>
>   	if (!ua) {
> diff --git a/ubuntu/iscsitarget/volume.c b/ubuntu/iscsitarget/volume.c
> index 6abe16b..2c9a698 100644
> --- a/ubuntu/iscsitarget/volume.c
> +++ b/ubuntu/iscsitarget/volume.c
> @@ -6,7 +6,6 @@
>
>   #include<linux/types.h>
>   #include<linux/parser.h>
> -#include<linux/log2.h>
>
>   #include "iscsi.h"
>   #include "iscsi_dbg.h"
> @@ -187,7 +186,7 @@ static int parse_volume_params(struct iet_volume *volume, char *params)
>   			blk_sz = simple_strtoull(argp, NULL, 10);
>   			if (is_power_of_2(blk_sz)&&
>   			512<= blk_sz&&  blk_sz<= IET_MAX_BLOCK_SIZE)
> -				volume->blk_shift = ilog2(blk_sz);
> +				volume->blk_shift = blksize_bits(blk_sz);
>   			else {
>   				eprintk("invalid BlockSize=%u\n", blk_sz);
>   				err = -EINVAL;

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Leann Ogasawara - Aug. 13, 2010, 4:08 p.m.
Applied to Maverick linux master.

Thanks,
Leann

On Fri, 2010-08-13 at 08:07 -0700, Leann Ogasawara wrote:
> Hi All,
> 
> Per the Maverick Ubuntu Delta Review blueprint [1] one of the remaining
> work items is to review the list of ubuntu/ drivers we're carrying and
> update any if a newer version is available.  As a result, I've found
> that iscsitarget has a newer 1.4.20.2 version available.  The following
> patch brings us up to date with this latest version (we're currently
> carrying 1.4.20.1).
> 
> Thanks,
> Leann
> 
> [1] https://blueprints.launchpad.net/ubuntu/+spec/kernel-maverick-ubuntu-delta-review
> 
> >From 1c628cedb01fc0c7e19c19f0cb82663634d4f58f Mon Sep 17 00:00:00 2001
> From: Leann Ogasawara <leann.ogasawara@canonical.com>
> Date: Wed, 11 Aug 2010 11:02:38 -0700
> Subject: [PATCH] UBUNTU: ubuntu: iscsitarget -- version 1.4.20.2
> 
> Update iscsitarget to the latest stable version (v1.4.20.2) from
> sourceforge.
> 
> ExternalDriver: iscsi_trgt
> Url: http://sourceforge.net/projects/iscsitarget/files/
> Version: 1.4.20.2
> 
> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
> ---
>  ubuntu/iscsitarget/BOM             |    4 ++--
>  ubuntu/iscsitarget/block-io.c      |    4 ++--
>  ubuntu/iscsitarget/compat.h        |   30 ++++++++++++++++++++++++++++++
>  ubuntu/iscsitarget/file-io.c       |    2 +-
>  ubuntu/iscsitarget/include/iet_u.h |    2 +-
>  ubuntu/iscsitarget/iscsi.h         |    1 +
>  ubuntu/iscsitarget/null-io.c       |    2 +-
>  ubuntu/iscsitarget/ua.c            |    2 +-
>  ubuntu/iscsitarget/volume.c        |    3 +--
>  9 files changed, 40 insertions(+), 10 deletions(-)
>  create mode 100644 ubuntu/iscsitarget/compat.h
> 
> diff --git a/ubuntu/iscsitarget/BOM b/ubuntu/iscsitarget/BOM
> index 0fde30c..40751ae 100644
> --- a/ubuntu/iscsitarget/BOM
> +++ b/ubuntu/iscsitarget/BOM
> @@ -1,2 +1,2 @@
> -Downloaded from:	svn://svn.berlios.de/iscsitarget/trunk
> -Current Version:	1.4.20.1
> +Downloaded from:	http://sourceforge.net/projects/iscsitarget/files/
> +Current Version:	1.4.20.2
> diff --git a/ubuntu/iscsitarget/block-io.c b/ubuntu/iscsitarget/block-io.c
> index 4de1d20..c812abf 100644
> --- a/ubuntu/iscsitarget/block-io.c
> +++ b/ubuntu/iscsitarget/block-io.c
> @@ -282,8 +282,8 @@ blockio_attach(struct iet_volume *volume, char *args)
>  		/* see Documentation/ABI/testing/sysfs-block */
>  		unsigned bsz = bdev_logical_block_size(bio_data->bdev);
>  		if (!volume->blk_shift)
> -			volume->blk_shift = ilog2(bsz);
> -		else if (volume->blk_shift < ilog2(bsz)) {
> +			volume->blk_shift = blksize_bits(bsz);
> +		else if (volume->blk_shift < blksize_bits(bsz)) {
>  			eprintk("Specified block size (%u) smaller than "
>  				"device %s logical block size (%u)\n",
>  				(1 << volume->blk_shift), bio_data->path, bsz);
> diff --git a/ubuntu/iscsitarget/compat.h b/ubuntu/iscsitarget/compat.h
> new file mode 100644
> index 0000000..631a49c
> --- /dev/null
> +++ b/ubuntu/iscsitarget/compat.h
> @@ -0,0 +1,30 @@
> +/*
> + * Kernel compatibility routines
> + *
> + * Copyright (C) 2008 Ross Walker <rswwalker at gmail dot com>
> + *
> + * Released under the terms of the GNU GPL v2.0.
> + */
> +
> +#ifndef __IET_COMPAT_H__
> +#define __IET_COMPAT_H__
> +
> +#include <linux/version.h>
> +
> +#ifndef DECLARE_COMPLETION_ONSTACK
> +#define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
> +#endif
> +
> +#ifndef is_power_of_2
> +#define is_power_of_2(n) (n != 0 && ((n & (n - 1)) == 0))
> +#endif
> +
> +#ifndef log2
> +#define log2(n) ((sizeof(n) <= 4) ? (fls(n) - 1) : (fls64(n) - 1))
> +#endif
> +
> +#ifndef roundup_pow_of_two
> +#define roundup_pow_of_two(n) (1UL << fls_long(n - 1))
> +#endif
> +
> +#endif	/* __IET_COMPAT_H__ */
> diff --git a/ubuntu/iscsitarget/file-io.c b/ubuntu/iscsitarget/file-io.c
> index 38951a9..a050fcc 100644
> --- a/ubuntu/iscsitarget/file-io.c
> +++ b/ubuntu/iscsitarget/file-io.c
> @@ -232,7 +232,7 @@ static int fileio_attach(struct iet_volume *lu, char *args)
>  	}
>  
>  	if (!lu->blk_shift)
> -		lu->blk_shift = ilog2(IET_DEF_BLOCK_SIZE);
> +		lu->blk_shift = blksize_bits(IET_DEF_BLOCK_SIZE);
>  
>  	lu->blk_cnt = inode->i_size >> lu->blk_shift;
>  
> diff --git a/ubuntu/iscsitarget/include/iet_u.h b/ubuntu/iscsitarget/include/iet_u.h
> index 174f0dc..6fdc716 100644
> --- a/ubuntu/iscsitarget/include/iet_u.h
> +++ b/ubuntu/iscsitarget/include/iet_u.h
> @@ -1,7 +1,7 @@
>  #ifndef _IET_U_H
>  #define _IET_U_H
>  
> -#define IET_VERSION_STRING	"1.4.20.1"
> +#define IET_VERSION_STRING	"1.4.20.2"
>  
>  /* The maximum length of 223 bytes in the RFC. */
>  #define ISCSI_NAME_LEN	256
> diff --git a/ubuntu/iscsitarget/iscsi.h b/ubuntu/iscsitarget/iscsi.h
> index e9d37a4..9ded23a 100644
> --- a/ubuntu/iscsitarget/iscsi.h
> +++ b/ubuntu/iscsitarget/iscsi.h
> @@ -19,6 +19,7 @@
>  
>  #include "iscsi_hdr.h"
>  #include "iet_u.h"
> +#include "compat.h"
>  
>  #define IET_SENSE_BUF_SIZE      18
>  
> diff --git a/ubuntu/iscsitarget/null-io.c b/ubuntu/iscsitarget/null-io.c
> index f64b18c..0b87507 100644
> --- a/ubuntu/iscsitarget/null-io.c
> +++ b/ubuntu/iscsitarget/null-io.c
> @@ -78,7 +78,7 @@ static int nullio_attach(struct iet_volume *lu, char *args)
>  	}
>  
>  	if (!lu->blk_shift)
> -		lu->blk_shift = ilog2(IET_DEF_BLOCK_SIZE);
> +		lu->blk_shift = blksize_bits(IET_DEF_BLOCK_SIZE);
>  
>  	/* defaults to 64 GiB */
>  	if (!lu->blk_cnt)
> diff --git a/ubuntu/iscsitarget/ua.c b/ubuntu/iscsitarget/ua.c
> index c4ba4c2..97f1ba0 100644
> --- a/ubuntu/iscsitarget/ua.c
> +++ b/ubuntu/iscsitarget/ua.c
> @@ -108,7 +108,7 @@ void ua_establish_for_session(struct iscsi_session *sess, u32 lun,
>  			      u8 asc, u8 ascq)
>  {
>  	struct list_head *l = &sess->ua_hash[ua_hashfn(lun)];
> -	struct ua_entry *ua = kmem_cache_alloc(ua_cache, GFP_KERNEL);
> +	struct ua_entry *ua = kmem_cache_alloc(ua_cache, GFP_ATOMIC);
>  	struct ua_entry *e;
>  
>  	if (!ua) {
> diff --git a/ubuntu/iscsitarget/volume.c b/ubuntu/iscsitarget/volume.c
> index 6abe16b..2c9a698 100644
> --- a/ubuntu/iscsitarget/volume.c
> +++ b/ubuntu/iscsitarget/volume.c
> @@ -6,7 +6,6 @@
>  
>  #include <linux/types.h>
>  #include <linux/parser.h>
> -#include <linux/log2.h>
>  
>  #include "iscsi.h"
>  #include "iscsi_dbg.h"
> @@ -187,7 +186,7 @@ static int parse_volume_params(struct iet_volume *volume, char *params)
>  			blk_sz = simple_strtoull(argp, NULL, 10);
>  			if (is_power_of_2(blk_sz) &&
>  			    512 <= blk_sz && blk_sz <= IET_MAX_BLOCK_SIZE)
> -				volume->blk_shift = ilog2(blk_sz);
> +				volume->blk_shift = blksize_bits(blk_sz);
>  			else {
>  				eprintk("invalid BlockSize=%u\n", blk_sz);
>  				err = -EINVAL;
> -- 
> 1.7.0.4
> 
> 
> 
>

Patch

diff --git a/ubuntu/iscsitarget/BOM b/ubuntu/iscsitarget/BOM
index 0fde30c..40751ae 100644
--- a/ubuntu/iscsitarget/BOM
+++ b/ubuntu/iscsitarget/BOM
@@ -1,2 +1,2 @@ 
-Downloaded from:	svn://svn.berlios.de/iscsitarget/trunk
-Current Version:	1.4.20.1
+Downloaded from:	http://sourceforge.net/projects/iscsitarget/files/
+Current Version:	1.4.20.2
diff --git a/ubuntu/iscsitarget/block-io.c b/ubuntu/iscsitarget/block-io.c
index 4de1d20..c812abf 100644
--- a/ubuntu/iscsitarget/block-io.c
+++ b/ubuntu/iscsitarget/block-io.c
@@ -282,8 +282,8 @@  blockio_attach(struct iet_volume *volume, char *args)
 		/* see Documentation/ABI/testing/sysfs-block */
 		unsigned bsz = bdev_logical_block_size(bio_data->bdev);
 		if (!volume->blk_shift)
-			volume->blk_shift = ilog2(bsz);
-		else if (volume->blk_shift < ilog2(bsz)) {
+			volume->blk_shift = blksize_bits(bsz);
+		else if (volume->blk_shift < blksize_bits(bsz)) {
 			eprintk("Specified block size (%u) smaller than "
 				"device %s logical block size (%u)\n",
 				(1 << volume->blk_shift), bio_data->path, bsz);
diff --git a/ubuntu/iscsitarget/compat.h b/ubuntu/iscsitarget/compat.h
new file mode 100644
index 0000000..631a49c
--- /dev/null
+++ b/ubuntu/iscsitarget/compat.h
@@ -0,0 +1,30 @@ 
+/*
+ * Kernel compatibility routines
+ *
+ * Copyright (C) 2008 Ross Walker <rswwalker at gmail dot com>
+ *
+ * Released under the terms of the GNU GPL v2.0.
+ */
+
+#ifndef __IET_COMPAT_H__
+#define __IET_COMPAT_H__
+
+#include <linux/version.h>
+
+#ifndef DECLARE_COMPLETION_ONSTACK
+#define DECLARE_COMPLETION_ONSTACK(work) DECLARE_COMPLETION(work)
+#endif
+
+#ifndef is_power_of_2
+#define is_power_of_2(n) (n != 0 && ((n & (n - 1)) == 0))
+#endif
+
+#ifndef log2
+#define log2(n) ((sizeof(n) <= 4) ? (fls(n) - 1) : (fls64(n) - 1))
+#endif
+
+#ifndef roundup_pow_of_two
+#define roundup_pow_of_two(n) (1UL << fls_long(n - 1))
+#endif
+
+#endif	/* __IET_COMPAT_H__ */
diff --git a/ubuntu/iscsitarget/file-io.c b/ubuntu/iscsitarget/file-io.c
index 38951a9..a050fcc 100644
--- a/ubuntu/iscsitarget/file-io.c
+++ b/ubuntu/iscsitarget/file-io.c
@@ -232,7 +232,7 @@  static int fileio_attach(struct iet_volume *lu, char *args)
 	}
 
 	if (!lu->blk_shift)
-		lu->blk_shift = ilog2(IET_DEF_BLOCK_SIZE);
+		lu->blk_shift = blksize_bits(IET_DEF_BLOCK_SIZE);
 
 	lu->blk_cnt = inode->i_size >> lu->blk_shift;
 
diff --git a/ubuntu/iscsitarget/include/iet_u.h b/ubuntu/iscsitarget/include/iet_u.h
index 174f0dc..6fdc716 100644
--- a/ubuntu/iscsitarget/include/iet_u.h
+++ b/ubuntu/iscsitarget/include/iet_u.h
@@ -1,7 +1,7 @@ 
 #ifndef _IET_U_H
 #define _IET_U_H
 
-#define IET_VERSION_STRING	"1.4.20.1"
+#define IET_VERSION_STRING	"1.4.20.2"
 
 /* The maximum length of 223 bytes in the RFC. */
 #define ISCSI_NAME_LEN	256
diff --git a/ubuntu/iscsitarget/iscsi.h b/ubuntu/iscsitarget/iscsi.h
index e9d37a4..9ded23a 100644
--- a/ubuntu/iscsitarget/iscsi.h
+++ b/ubuntu/iscsitarget/iscsi.h
@@ -19,6 +19,7 @@ 
 
 #include "iscsi_hdr.h"
 #include "iet_u.h"
+#include "compat.h"
 
 #define IET_SENSE_BUF_SIZE      18
 
diff --git a/ubuntu/iscsitarget/null-io.c b/ubuntu/iscsitarget/null-io.c
index f64b18c..0b87507 100644
--- a/ubuntu/iscsitarget/null-io.c
+++ b/ubuntu/iscsitarget/null-io.c
@@ -78,7 +78,7 @@  static int nullio_attach(struct iet_volume *lu, char *args)
 	}
 
 	if (!lu->blk_shift)
-		lu->blk_shift = ilog2(IET_DEF_BLOCK_SIZE);
+		lu->blk_shift = blksize_bits(IET_DEF_BLOCK_SIZE);
 
 	/* defaults to 64 GiB */
 	if (!lu->blk_cnt)
diff --git a/ubuntu/iscsitarget/ua.c b/ubuntu/iscsitarget/ua.c
index c4ba4c2..97f1ba0 100644
--- a/ubuntu/iscsitarget/ua.c
+++ b/ubuntu/iscsitarget/ua.c
@@ -108,7 +108,7 @@  void ua_establish_for_session(struct iscsi_session *sess, u32 lun,
 			      u8 asc, u8 ascq)
 {
 	struct list_head *l = &sess->ua_hash[ua_hashfn(lun)];
-	struct ua_entry *ua = kmem_cache_alloc(ua_cache, GFP_KERNEL);
+	struct ua_entry *ua = kmem_cache_alloc(ua_cache, GFP_ATOMIC);
 	struct ua_entry *e;
 
 	if (!ua) {
diff --git a/ubuntu/iscsitarget/volume.c b/ubuntu/iscsitarget/volume.c
index 6abe16b..2c9a698 100644
--- a/ubuntu/iscsitarget/volume.c
+++ b/ubuntu/iscsitarget/volume.c
@@ -6,7 +6,6 @@ 
 
 #include <linux/types.h>
 #include <linux/parser.h>
-#include <linux/log2.h>
 
 #include "iscsi.h"
 #include "iscsi_dbg.h"
@@ -187,7 +186,7 @@  static int parse_volume_params(struct iet_volume *volume, char *params)
 			blk_sz = simple_strtoull(argp, NULL, 10);
 			if (is_power_of_2(blk_sz) &&
 			    512 <= blk_sz && blk_sz <= IET_MAX_BLOCK_SIZE)
-				volume->blk_shift = ilog2(blk_sz);
+				volume->blk_shift = blksize_bits(blk_sz);
 			else {
 				eprintk("invalid BlockSize=%u\n", blk_sz);
 				err = -EINVAL;