patch-fsr_xfs_fsr_c 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. --- xfsprogs-3.1.11.orig/fsr/xfs_fsr.c 2013-05-08 20:14:32.000000000 +0200
  2. +++ xfsprogs-3.1.11/fsr/xfs_fsr.c 2014-05-06 07:55:04.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. @@ -1034,6 +1033,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. @@ -1044,6 +1044,7 @@ fsr_setup_attr_fork(
  18. }
  19. goto out;
  20. }
  21. +#endif
  22. /* attr2 w/ fork offsets */
  23. @@ -1081,6 +1082,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. @@ -1089,7 +1091,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. @@ -1128,11 +1130,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 */