Thread (2 messages) 2 messages, 2 authors, 2012-05-31

Re: [PATCH 04/12] container quota: introduce container disk quota data header file.

From: Glauber Costa <hidden>
Date: 2012-05-31 09:13:17
Also in: linux-ext4, linux-fsdevel

Possibly related (same subject, not in this thread)

+
+/* Operations for quota control */
+struct ns_quotactl_ops {
+	int (*quota_on)(struct mnt_namespace *, int);
+	int (*quota_off)(struct mnt_namespace *, int);
+	int (*get_info)(struct mnt_namespace *, int, struct if_dqinfo *);
+	int (*set_info)(struct mnt_namespace *, int, struct if_dqinfo *);
+	int (*get_dqblk)(struct mnt_namespace *, int, qid_t,
+			 struct fs_disk_quota *);
+	int (*set_dqblk)(struct mnt_namespace *, int, qid_t,
+			 struct fs_disk_quota *);
+};
+
That is quite bad. Just have the same signature. Which namespace you 
belong to can *always* be derived from the calling process, you should 
never need to specify that in any interface. It is of course fine to do 
that in functions internal to the kernel, but not this.

You should rethink the whole ns_quota thing. Some of it I believe will 
have to stay, I doubt we'll be able to be completely transparent. But 
the core of your changes have to be making sure a hierarchical walk over 
the valid quotas work well, finding out what are those valid quotas, etc.

The interface should be kept as unchanged as possible, and this can be 
achieved by things like automatic discover of the current namespace, and 
pre-operational container setup for the relevant files.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help