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