xfs
[Top] [All Lists]

Re: copying to xfs causes cp to go to sleep

To: Bernd Markgraf <markgraf@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: copying to xfs causes cp to go to sleep
From: Steve Lord <lord@xxxxxxx>
Date: Sat, 01 Apr 2000 08:17:10 -0600
Cc: Andi Kleen <ak@xxxxxxx>, linux-xfs@xxxxxxxxxxx
In-reply-to: Your message of "Sat, 01 Apr 2000 15:58:27 +0200
Sender: owner-linux-xfs@xxxxxxxxxxx
OK for the cp blowing up try this patch against revision 1.40 of
xfs_iops.c (which should be the latest in the CVS tree). A failure
in create was returning 0 to the calling code.

I suspect the cp will still hang - I am working on the out of space
code path (which I still think could be triggered here), yet another
change will be required to deal with that one.

Steve

*** /usr/tmp/TmpDir.14774-0/linux/fs/xfs/linux/xfs_iops.c_1.40  Sat Apr  1 
08:11:32 2000
--- linux/fs/xfs/linux/xfs_iops.c       Sat Apr  1 07:27:43 2000
***************
*** 114,120 ****
                VOP_MKDIR(dvp, (char *)dentry->d_name.name, &va, &vp,
                        &cred, error);
        } else {
!               error = -EINVAL;
        }
  
        if (!error) {
--- 114,120 ----
                VOP_MKDIR(dvp, (char *)dentry->d_name.name, &va, &vp,
                        &cred, error);
        } else {
!               error = EINVAL;
        }
  
        if (!error) {
***************
*** 128,134 ****
                }
                d_instantiate(dentry, ip);
        }
!       return 0;
  }
  
  
--- 128,134 ----
                }
                d_instantiate(dentry, ip);
        }
!       return -error;
  }
  
  
***************
*** 498,504 ****
          vp = LINVFS_GET_VP(ip);
        VOP_ACCESS(vp, mode, &cred, error);
  
!       return error ? -error : 0;
  }
  
  /* Brute force approach for now - copy data into linux inode
--- 498,504 ----
          vp = LINVFS_GET_VP(ip);
        VOP_ACCESS(vp, mode, &cred, error);
  
!       return -error;
  }
  
  /* Brute force approach for now - copy data into linux inode
***************
*** 517,535 ****
          va.va_mask = AT_STAT;
          VOP_GETATTR(vp, &va, 0, &cred, error);
  
!         inode->i_mode = VTTOIF(va.va_type) | va.va_mode;
!         inode->i_nlink = va.va_nlink;
!         inode->i_uid = va.va_uid;
!         inode->i_gid = va.va_gid;
!         inode->i_rdev = va.va_rdev;
!         inode->i_size = va.va_size;
!         inode->i_blocks = va.va_nblocks >> (PAGE_SHIFT - 9);
!         inode->i_blksize = PAGE_SIZE;
!         inode->i_atime = va.va_atime.tv_sec;
!         inode->i_mtime = va.va_mtime.tv_sec;
!         inode->i_ctime = va.va_ctime.tv_sec;
  
!         return 0;
  }
  
  int
--- 517,537 ----
          va.va_mask = AT_STAT;
          VOP_GETATTR(vp, &va, 0, &cred, error);
  
!       if (!error) {
!               inode->i_mode = VTTOIF(va.va_type) | va.va_mode;
!               inode->i_nlink = va.va_nlink;
!               inode->i_uid = va.va_uid;
!               inode->i_gid = va.va_gid;
!               inode->i_rdev = va.va_rdev;
!               inode->i_size = va.va_size;
!               inode->i_blocks = va.va_nblocks >> (PAGE_SHIFT - 9);
!               inode->i_blksize = PAGE_SIZE;
!               inode->i_atime = va.va_atime.tv_sec;
!               inode->i_mtime = va.va_mtime.tv_sec;
!               inode->i_ctime = va.va_ctime.tv_sec;
!       }
  
!         return -error;
  }
  
  int



<Prev in Thread] Current Thread [Next in Thread>