Author: mav
Date: Fri Nov  7 20:42:15 2014
New Revision: 274253
URL: https://svnweb.freebsd.org/changeset/base/274253

Log:
  Fix LUN resize broken by r272911 commit.
  
  MFC after:    3 days

Modified:
  head/sys/cam/ctl/ctl_backend_block.c

Modified: head/sys/cam/ctl/ctl_backend_block.c
==============================================================================
--- head/sys/cam/ctl/ctl_backend_block.c        Fri Nov  7 20:23:43 2014        
(r274252)
+++ head/sys/cam/ctl/ctl_backend_block.c        Fri Nov  7 20:42:15 2014        
(r274253)
@@ -2392,7 +2392,7 @@ ctl_be_block_modify(struct ctl_be_block_
 
        be_lun->params.lun_size_bytes = params->lun_size_bytes;
 
-       oldsize = be_lun->size_blocks;
+       oldsize = be_lun->size_bytes;
        if (be_lun->vn == NULL)
                error = ctl_be_block_open(softc, be_lun, req);
        else if (be_lun->vn->v_type == VREG)
@@ -2400,7 +2400,7 @@ ctl_be_block_modify(struct ctl_be_block_
        else
                error = ctl_be_block_modify_dev(be_lun, req);
 
-       if (error == 0 && be_lun->size_blocks != oldsize) {
+       if (error == 0 && be_lun->size_bytes != oldsize) {
                be_lun->size_blocks = be_lun->size_bytes >>
                    be_lun->blocksize_shift;
 
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to