Diff for /xfs-linux/xfs_iomap.c between versions 1.58 and 1.59

version 1.58, 2007/09/21 04:08:28 version 1.59, 2007/09/21 16:10:12
Line 57  xfs_iomap_enter_trace( Line 57  xfs_iomap_enter_trace(
         xfs_off_t       offset,          xfs_off_t       offset,
         ssize_t         count)          ssize_t         count)
 {  {
         xfs_iocore_t    *io = &ip->i_iocore;  
   
         if (!ip->i_rwtrace)          if (!ip->i_rwtrace)
                 return;                  return;
   
Line 70  xfs_iomap_enter_trace( Line 68  xfs_iomap_enter_trace(
                 (void *)((unsigned long)((offset >> 32) & 0xffffffff)),                  (void *)((unsigned long)((offset >> 32) & 0xffffffff)),
                 (void *)((unsigned long)(offset & 0xffffffff)),                  (void *)((unsigned long)(offset & 0xffffffff)),
                 (void *)((unsigned long)count),                  (void *)((unsigned long)count),
                 (void *)((unsigned long)((io->io_new_size >> 32) & 0xffffffff)),                  (void *)((unsigned long)((ip->i_new_size >> 32) & 0xffffffff)),
                 (void *)((unsigned long)(io->io_new_size & 0xffffffff)),                  (void *)((unsigned long)(ip->i_new_size & 0xffffffff)),
                 (void *)((unsigned long)current_pid()),                  (void *)((unsigned long)current_pid()),
                 (void *)NULL,                  (void *)NULL,
                 (void *)NULL,                  (void *)NULL,
Line 186  xfs_iomap( Line 184  xfs_iomap(
         int             iomap_flags = 0;          int             iomap_flags = 0;
   
         ASSERT((ip->i_d.di_mode & S_IFMT) == S_IFREG);          ASSERT((ip->i_d.di_mode & S_IFMT) == S_IFREG);
         ASSERT(((ip->i_d.di_flags & XFS_DIFLAG_REALTIME) != 0) ==  
                ((ip->i_iocore.io_flags & XFS_IOCORE_RT) != 0));  
   
         if (XFS_FORCED_SHUTDOWN(mp))          if (XFS_FORCED_SHUTDOWN(mp))
                 return XFS_ERROR(EIO);                  return XFS_ERROR(EIO);
Line 402  xfs_iomap_write_direct( Line 398  xfs_iomap_write_direct(
         int             found)          int             found)
 {  {
         xfs_mount_t     *mp = ip->i_mount;          xfs_mount_t     *mp = ip->i_mount;
         xfs_iocore_t    *io = &ip->i_iocore;  
         xfs_fileoff_t   offset_fsb;          xfs_fileoff_t   offset_fsb;
         xfs_fileoff_t   last_fsb;          xfs_fileoff_t   last_fsb;
         xfs_filblks_t   count_fsb, resaligned;          xfs_filblks_t   count_fsb, resaligned;
Line 432  xfs_iomap_write_direct( Line 427  xfs_iomap_write_direct(
         extsz = xfs_get_extsz_hint(ip);          extsz = xfs_get_extsz_hint(ip);
   
         isize = ip->i_size;          isize = ip->i_size;
         if (io->io_new_size > isize)          if (ip->i_new_size > isize)
                 isize = io->io_new_size;                  isize = ip->i_new_size;
   
         offset_fsb = XFS_B_TO_FSBT(mp, offset);          offset_fsb = XFS_B_TO_FSBT(mp, offset);
         last_fsb = XFS_B_TO_FSB(mp, ((xfs_ufsize_t)(offset + count)));          last_fsb = XFS_B_TO_FSB(mp, ((xfs_ufsize_t)(offset + count)));
Line 528  xfs_iomap_write_direct( Line 523  xfs_iomap_write_direct(
                 goto error_out;                  goto error_out;
         }          }
   
         if (unlikely(!imap.br_startblock && !(io->io_flags & XFS_IOCORE_RT))) {          if (unlikely(!imap.br_startblock &&
                        !(ip->i_d.di_flags & XFS_DIFLAG_REALTIME))) {
                 error = xfs_cmn_err_fsblock_zero(ip, &imap);                  error = xfs_cmn_err_fsblock_zero(ip, &imap);
                 goto error_out;                  goto error_out;
         }          }
Line 616  xfs_iomap_write_delay( Line 612  xfs_iomap_write_delay(
         int             *nmaps)          int             *nmaps)
 {  {
         xfs_mount_t     *mp = ip->i_mount;          xfs_mount_t     *mp = ip->i_mount;
         xfs_iocore_t    *io = &ip->i_iocore;  
         xfs_fileoff_t   offset_fsb;          xfs_fileoff_t   offset_fsb;
         xfs_fileoff_t   last_fsb;          xfs_fileoff_t   last_fsb;
         xfs_off_t       aligned_offset;          xfs_off_t       aligned_offset;
Line 644  xfs_iomap_write_delay( Line 639  xfs_iomap_write_delay(
   
 retry:  retry:
         isize = ip->i_size;          isize = ip->i_size;
         if (io->io_new_size > isize)          if (ip->i_new_size > isize)
                 isize = io->io_new_size;                  isize = ip->i_new_size;
   
         error = xfs_iomap_eof_want_preallocate(mp, ip, isize, offset, count,          error = xfs_iomap_eof_want_preallocate(mp, ip, isize, offset, count,
                                 ioflag, imap, XFS_WRITE_IMAPS, &prealloc);                                  ioflag, imap, XFS_WRITE_IMAPS, &prealloc);
Line 691  retry: Line 686  retry:
                 goto retry;                  goto retry;
         }          }
   
         if (unlikely(!imap[0].br_startblock && !(io->io_flags & XFS_IOCORE_RT)))          if (unlikely(!imap[0].br_startblock &&
                        !(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)))
                 return xfs_cmn_err_fsblock_zero(ip, &imap[0]);                  return xfs_cmn_err_fsblock_zero(ip, &imap[0]);
   
         *ret_imap = imap[0];          *ret_imap = imap[0];
Line 716  xfs_iomap_write_allocate( Line 712  xfs_iomap_write_allocate(
         int             *retmap)          int             *retmap)
 {  {
         xfs_mount_t     *mp = ip->i_mount;          xfs_mount_t     *mp = ip->i_mount;
         xfs_iocore_t    *io = &ip->i_iocore;  
         xfs_fileoff_t   offset_fsb, last_block;          xfs_fileoff_t   offset_fsb, last_block;
         xfs_fileoff_t   end_fsb, map_start_fsb;          xfs_fileoff_t   end_fsb, map_start_fsb;
         xfs_fsblock_t   first_block;          xfs_fsblock_t   first_block;
Line 814  xfs_iomap_write_allocate( Line 809  xfs_iomap_write_allocate(
                  */                   */
                 for (i = 0; i < nimaps; i++) {                  for (i = 0; i < nimaps; i++) {
                         if (unlikely(!imap[i].br_startblock &&                          if (unlikely(!imap[i].br_startblock &&
                                      !(io->io_flags & XFS_IOCORE_RT)))                                       !(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)))
                                 return xfs_cmn_err_fsblock_zero(ip, &imap[i]);                                  return xfs_cmn_err_fsblock_zero(ip, &imap[i]);
                         if ((offset_fsb >= imap[i].br_startoff) &&                          if ((offset_fsb >= imap[i].br_startoff) &&
                             (offset_fsb < (imap[i].br_startoff +                              (offset_fsb < (imap[i].br_startoff +
Line 850  xfs_iomap_write_unwritten( Line 845  xfs_iomap_write_unwritten(
         size_t          count)          size_t          count)
 {  {
         xfs_mount_t     *mp = ip->i_mount;          xfs_mount_t     *mp = ip->i_mount;
         xfs_iocore_t    *io = &ip->i_iocore;  
         xfs_fileoff_t   offset_fsb;          xfs_fileoff_t   offset_fsb;
         xfs_filblks_t   count_fsb;          xfs_filblks_t   count_fsb;
         xfs_filblks_t   numblks_fsb;          xfs_filblks_t   numblks_fsb;
Line 913  xfs_iomap_write_unwritten( Line 907  xfs_iomap_write_unwritten(
                         return XFS_ERROR(error);                          return XFS_ERROR(error);
   
                 if (unlikely(!imap.br_startblock &&                  if (unlikely(!imap.br_startblock &&
                              !(io->io_flags & XFS_IOCORE_RT)))                               !(ip->i_d.di_flags & XFS_DIFLAG_REALTIME)))
                         return xfs_cmn_err_fsblock_zero(ip, &imap);                          return xfs_cmn_err_fsblock_zero(ip, &imap);
   
                 if ((numblks_fsb = imap.br_blockcount) == 0) {                  if ((numblks_fsb = imap.br_blockcount) == 0) {

Removed from v.1.58  
changed lines
  Added in v.1.59


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>