patch-fsr_xfs_fsr_c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --- xfsprogs-3.1.10.orig/fsr/xfs_fsr.c 2012-12-13 22:29:24.000000000 +0100
  2. +++ xfsprogs-3.1.10/fsr/xfs_fsr.c 2013-04-04 16:39:27.000000000 +0200
  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. @@ -1032,6 +1031,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. @@ -1042,6 +1042,7 @@ fsr_setup_attr_fork(
  18. }
  19. goto out;
  20. }
  21. +#endif
  22. /* attr2 w/ fork offsets */
  23. @@ -1079,6 +1080,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. @@ -1087,7 +1089,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. @@ -1126,11 +1128,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 */