CVS log for xfs-linux/linux-2.6/xfs_ioctl32.c

[BACK] Up to [Development] / xfs-linux / linux-2.6

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: HEAD


Revision 1.24 / (download) - annotate - [select for diffs], Mon Nov 19 14:46:07 2007 UTC (9 years, 10 months ago) by lachlan.longdrop.melbourne.sgi.com
Branch: MAIN
CVS Tags: HEAD
Changes since 1.23: +3 -0 lines
Diff to previous 1.23 (unified)

Undoes mod:     xfs-linux-melb:xfs-kern:29840a
Various fixups for xfs_bulkstat().

- sanity check for NULL user buffer in xfs_ioc_bulkstat[_compat]()

- remove the special case for XFS_IOC_FSBULKSTAT with count == 1.  This special
  case causes bulkstat to fail because the special case uses xfs_bulkstat_single()
  instead of xfs_bulkstat() and the two functions have different semantics.
  xfs_bulkstat() will return the next inode after the one supplied while skipping
  internal inodes (ie quota inodes).  xfs_bulkstate_single() will only lookup the
  inode supplied and return an error if it is an internal inode.

- in xfs_bulkstat(), need to initialise 'lastino' to the inode supplied so in cases
  were we return without examining any inodes the scan wont restart back at zero.

- sanity check for valid *ubcountp values.  Cannot sanity check for valid ubuffer
  here because some users of xfs_bulkstat() don't supply a buffer.

- checks against 'ubleft' (the space left in the user's buffer) should be against
  'statstruct_size' which is the supplied minimum object size.  The mixture of
  checks against statstruct_size and 0 was one of the reasons we were skipping
  inodes.

- if the formatter function returns BULKSTAT_RV_NOTHING and an error and the error
  is not ENOENT or EINVAL then we need to abort the scan.  ENOENT is for inodes that
  are no longer valid and we just skip them.  EINVAL is returned if we try to lookup
  an internal inode so we skip them too.  For a DMF scan if the inode and DMF
  attribute cannot fit into the space left in the user's buffer it would return
  ERANGE.  We didn't handle this error and skipped the inode.  We would continue to
  skip inodes until one fitted into the user's buffer or we completed the scan.

- put back the recalculation of agino (that got removed with the last fix) at the
  end of the while loop.  This is because the code at the start of the loop expects
  agino to be the last inode examined if it is non-zero.

- if we found some inodes but then encountered an error, return success this time
  and the error next time.  If the formatter aborted with ENOMEM we will now return
  this error but only if we couldn't read any inodes.  Previously if we encountered
  ENOMEM without reading any inodes we returned a zero count and no error which
  falsely indicated the scan was complete.
Merge of xfs-linux-melb:xfs-kern:30089a by kenmcd.

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




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