]>
Commit | Line | Data |
---|---|---|
d74a2036 | 1 | NOTE: this got fixed by kernel change in 3.4 making sync a no-op operation. |
0a4251c6 AM |
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 | Index: xfsprogs-dev/quota/quota.h | |
77 | =================================================================== | |
78 | --- xfsprogs-dev.orig/quota/quota.h 2012-01-27 11:11:10.000000000 +0000 | |
79 | +++ xfsprogs-dev/quota/quota.h 2012-01-27 11:11:20.000000000 +0000 | |
80 | @@ -41,7 +41,6 @@ enum { | |
81 | XFS_SETQLIM, /* set disk limits */ | |
82 | XFS_GETQSTAT, /* get quota subsystem status */ | |
83 | XFS_QUOTARM, /* free disk space used by dquots */ | |
84 | - XFS_QSYNC, /* flush delayed allocate space */ | |
85 | }; | |
86 | ||
87 | /* | |
88 | Index: xfsprogs-dev/quota/report.c | |
89 | =================================================================== | |
90 | --- xfsprogs-dev.orig/quota/report.c 2012-01-27 11:09:41.000000000 +0000 | |
91 | +++ xfsprogs-dev/quota/report.c 2012-01-27 11:10:19.000000000 +0000 | |
92 | @@ -520,10 +520,6 @@ report_any_type( | |
93 | if (type & XFS_USER_QUOTA) { | |
94 | fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor); | |
95 | while ((mount = fs_cursor_next_entry(&cursor))) { | |
96 | - if (xfsquotactl(XFS_QSYNC, mount->fs_name, | |
97 | - XFS_USER_QUOTA, 0, NULL) < 0 | |
98 | - && errno != ENOENT && errno != ENOSYS) | |
99 | - perror("XFS_QSYNC user quota"); | |
100 | report_user_mount(fp, form, mount, | |
101 | lower, upper, flags); | |
102 | } | |
103 | @@ -531,10 +527,6 @@ report_any_type( | |
104 | if (type & XFS_GROUP_QUOTA) { | |
105 | fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor); | |
106 | while ((mount = fs_cursor_next_entry(&cursor))) { | |
107 | - if (xfsquotactl(XFS_QSYNC, mount->fs_name, | |
108 | - XFS_GROUP_QUOTA, 0, NULL) < 0 | |
109 | - && errno != ENOENT && errno != ENOSYS) | |
110 | - perror("XFS_QSYNC group quota"); | |
111 | report_group_mount(fp, form, mount, | |
112 | lower, upper, flags); | |
113 | } | |
114 | @@ -542,10 +534,6 @@ report_any_type( | |
115 | if (type & XFS_PROJ_QUOTA) { | |
116 | fs_cursor_initialise(dir, FS_MOUNT_POINT, &cursor); | |
117 | while ((mount = fs_cursor_next_entry(&cursor))) { | |
118 | - if (xfsquotactl(XFS_QSYNC, mount->fs_name, | |
119 | - XFS_PROJ_QUOTA, 0, NULL) < 0 | |
120 | - && errno != ENOENT && errno != ENOSYS) | |
121 | - perror("XFS_QSYNC proj quota"); | |
122 | report_project_mount(fp, form, mount, | |
123 | lower, upper, flags); | |
124 | } |