patch-fsr_xfs_fsr_c 1.5 KB

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