patch-fsr_xfs_fsr_c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --- xfsprogs-3.1.4.orig/fsr/xfs_fsr.c 2010-10-01 19:33:38.000000000 +0200
  2. +++ xfsprogs-3.1.4/fsr/xfs_fsr.c 2011-01-22 20:34:12.465325200 +0100
  3. @@ -35,7 +35,6 @@
  4. #include <sys/wait.h>
  5. #include <sys/vfs.h>
  6. #include <sys/statvfs.h>
  7. -#include <sys/xattr.h>
  8. #ifndef XFS_XFLAG_NODEFRAG
  9. @@ -1003,6 +1002,7 @@ fsr_setup_attr_fork(
  10. * use the old method if we have attr1 or the kernel does not yet
  11. * support passing the fork offset in the bulkstat data.
  12. */
  13. +#if 0
  14. if (!(fsgeom.flags & XFS_FSOP_GEOM_FLAGS_ATTR2) ||
  15. bstatp->bs_forkoff == 0) {
  16. /* attr1 */
  17. @@ -1013,6 +1013,7 @@ fsr_setup_attr_fork(
  18. }
  19. goto out;
  20. }
  21. +#endif
  22. /* attr2 w/ fork offsets */
  23. @@ -1050,6 +1051,7 @@ fsr_setup_attr_fork(
  24. * If there is no attribute, then we need to create one to get
  25. * an attribute fork at the default location.
  26. */
  27. +#if 0
  28. if (!tbstat.bs_forkoff) {
  29. ret = fsetxattr(tfd, name, "XX", 2, XATTR_CREATE);
  30. if (ret) {
  31. @@ -1058,7 +1060,7 @@ fsr_setup_attr_fork(
  32. }
  33. continue;
  34. }
  35. -
  36. +#endif
  37. /*
  38. * make a progress check so we don't get stuck trying to extend
  39. * a large btree form attribute fork.
  40. @@ -1097,11 +1099,13 @@ fsr_setup_attr_fork(
  41. }
  42. /* we need to grow the attr fork, so create another attr */
  43. +#if 0
  44. ret = fsetxattr(tfd, name, "XX", 2, XATTR_CREATE);
  45. if (ret) {
  46. fsrprintf(_("could not set ATTR\n"));
  47. return -1;
  48. }
  49. +#endif
  50. } while (++i < 100); /* don't go forever */