]> git.pld-linux.org Git - packages/xfsprogs.git/blob - xfsprogs-noquotasync.patch
- updated pl.po-update patch
[packages/xfsprogs.git] / xfsprogs-noquotasync.patch
1 NOTE: this got fixed by kernel change in 3.4 making sync a no-op operation.
2
3 In 2005 commit master-melb:xfs-cmds:23840a from Nathan added calls to
4 XFS_QSYNC/Q_XQUOTASYNC to xfs_quota, with the following rather sparse
5 description:
6
7  "Issue a quote sync before reporting quota, resolving issue with delayed
8   allocation."
9
10 I can't really see a reason for this - we do quota accounting by the time
11 we reserve space for the delayed allocation, and while converting the
12 reservations might change the quota accounting minimally due to the amount
13 of btree blocks used for the bmap btree on large files in generally this
14 makes little sense, and on today's large system has a large performance
15 impact.  Also only xfs_quota ever did these calls, the generic quota tool
16 never did any kind of sync, and of course removing it does not cause
17 any regressions in xfstests.
18
19 Nathan, I've cced you in case you still remember anything about this,
20 although it's fairly unlikely after 6.5 years.  Also if anyone at SGI
21 can find anything about the above commits in BugWorks additional feedback
22 would be welcome.
23
24 Signed-off-by: Christoph Hellwig <hch@lst.de>
25
26 Index: xfsprogs-dev/quota/free.c
27 ===================================================================
28 --- xfsprogs-dev.orig/quota/free.c      2012-01-27 11:10:34.000000000 +0000
29 +++ xfsprogs-dev/quota/free.c   2012-01-27 11:10:42.000000000 +0000
30 @@ -167,7 +167,6 @@ projects_free_space_data(
31                 return 0;
32         }
33  
34 -       xfsquotactl(XFS_QSYNC, dev, type, fsx.fsx_projid, NULL);
35         if (xfsquotactl(XFS_GETQUOTA, dev, type, fsx.fsx_projid, &d) < 0) {
36                 perror("XFS_GETQUOTA");
37                 close(fd);
38 Index: xfsprogs-dev/quota/irix.c
39 ===================================================================
40 --- xfsprogs-dev.orig/quota/irix.c      2012-01-27 11:10:52.000000000 +0000
41 +++ xfsprogs-dev/quota/irix.c   2012-01-27 11:10:59.000000000 +0000
42 @@ -45,8 +45,6 @@ xcommand_to_qcommand(
43                 return Q_XGETQSTAT;
44         case XFS_QUOTARM:
45                 return Q_XQUOTARM;
46 -       case XFS_QSYNC:
47 -               return Q_SYNC;
48         }
49         return 0;
50  }
51 Index: xfsprogs-dev/quota/linux.c
52 ===================================================================
53 --- xfsprogs-dev.orig/quota/linux.c     2012-01-27 11:11:02.000000000 +0000
54 +++ xfsprogs-dev/quota/linux.c  2012-01-27 11:11:05.000000000 +0000
55 @@ -55,8 +55,6 @@ xcommand_to_qcommand(
56                 return Q_XGETQSTAT;
57         case XFS_QUOTARM:
58                 return Q_XQUOTARM;
59 -       case XFS_QSYNC:
60 -               return Q_XQUOTASYNC;
61         }
62         return 0;
63  }
64 Index: xfsprogs-dev/quota/quota.c
65 ===================================================================
66 --- xfsprogs-dev.orig/quota/quota.c     2012-01-27 11:10:24.000000000 +0000
67 +++ xfsprogs-dev/quota/quota.c  2012-01-27 11:10:29.000000000 +0000
68 @@ -64,7 +64,6 @@ quota_mount(
69         uint            qflags;
70         int             count;
71  
72 -       xfsquotactl(XFS_QSYNC, dev, type, 0, NULL);
73         if (xfsquotactl(XFS_GETQUOTA, dev, type, id, (void *)&d) < 0)
74                 return 0;
75  
76 --- xfsprogs-4.5.0/quota/quota.h~       2016-02-29 00:39:26.000000000 +0100
77 +++ xfsprogs-4.5.0/quota/quota.h        2016-03-15 08:29:58.643935671 +0100
78 @@ -42,7 +42,6 @@ enum {
79         XFS_SETQLIM,    /* set disk limits */
80         XFS_GETQSTAT,   /* get quota subsystem status */
81         XFS_QUOTARM,    /* free disk space used by dquots */
82 -       XFS_QSYNC,      /* flush delayed allocate space */
83         XFS_GETQSTATV,  /* newer version of quota stats */
84         XFS_GETNEXTQUOTA, /* get disk limits and usage */
85  };
86 Index: xfsprogs-dev/quota/report.c
87 ===================================================================
88 --- xfsprogs-dev.orig/quota/report.c    2012-01-27 11:09:41.000000000 +0000
89 +++ xfsprogs-dev/quota/report.c 2012-01-27 11:10:19.000000000 +0000
90 @@ -520,10 +520,6 @@ report_any_type(
91         if (type & XFS_USER_QUOTA) {
92                 fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor);
93                 while ((mount = fs_cursor_next_entry(&cursor))) {
94 -                       if (xfsquotactl(XFS_QSYNC, mount->fs_name,
95 -                                               XFS_USER_QUOTA, 0, NULL) < 0
96 -                                       && errno != ENOENT && errno != ENOSYS)
97 -                               perror("XFS_QSYNC user quota");
98                         report_user_mount(fp, form, mount,
99                                                 lower, upper, flags);
100                 }
101 @@ -531,10 +527,6 @@ report_any_type(
102         if (type & XFS_GROUP_QUOTA) {
103                 fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor);
104                 while ((mount = fs_cursor_next_entry(&cursor))) {
105 -                       if (xfsquotactl(XFS_QSYNC, mount->fs_name,
106 -                                               XFS_GROUP_QUOTA, 0, NULL) < 0
107 -                                       && errno != ENOENT && errno != ENOSYS)
108 -                               perror("XFS_QSYNC group quota");
109                         report_group_mount(fp, form, mount,
110                                                 lower, upper, flags);
111                 }
112 @@ -542,10 +534,6 @@ report_any_type(
113         if (type & XFS_PROJ_QUOTA) {
114                 fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor);
115                 while ((mount = fs_cursor_next_entry(&cursor))) {
116 -                       if (xfsquotactl(XFS_QSYNC, mount->fs_name,
117 -                                               XFS_PROJ_QUOTA, 0, NULL) < 0
118 -                                       && errno != ENOENT && errno != ENOSYS)
119 -                               perror("XFS_QSYNC proj quota");
120                         report_project_mount(fp, form, mount,
121                                                 lower, upper, flags);
122                 }
This page took 0.076795 seconds and 3 git commands to generate.