All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: ext4, quota, projectid:  limits without capablity
       [not found] <c18ff577-be92-40ea-93ae-4401ce2107da.yuanliang.wyl@alibaba-inc.com>
@ 2018-01-05 19:20 ` Theodore Ts'o
       [not found] ` <0dc571a8-e1b2-4247-9e9d-df02c0b0d7c6.yuanliang.wyl@alibaba-inc.com>
  1 sibling, 0 replies; 2+ messages in thread
From: Theodore Ts'o @ 2018-01-05 19:20 UTC (permalink / raw)
  To: 王元良
  Cc: adilger.kernel, pkuelelixi, jack, linux-ext4, linux-kernel

On Fri, Jan 05, 2018 at 03:23:43PM +0800, 王元良 wrote:
> 
> hi,  all
> We use projectid for space restrictions inside the container, share the same hard link between the host and multiple containers.
> But I encountered a problem, as follows, are the following modifications feasible ?

I'm not sure what the problem that you encoutered.  So it's hard to
judge the modification, especially since you didn't send it in a
proper unified diff format.

It looks like you are trying to allow root to avoid the restriction an
entire directory hierarchy (all files and subdirectories) must have
the same project ID.  There are a couple of problems with this.  For
example, you only do this for the link case, but we enforce the same
restriction in other places, such as the rename case.

The current restrictions are to make life simpler for users.  The
restrictions are also part of the xfstests regression test, so I'm
fairly certain will cause a test failure.

So this is something I wouldn't want to do without general agreement
across all of the file systems developers, since it breaks the
fundamental model of how project IDs are presented to users, and could
end up making things extremely confusing.  So the best way to do this
is for you to give much more details about why you want this change,
and what is the larger context of what is you are trying to do.

    	    	       	       	  - Ted

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: 回复:ext4, quota, projectid:  limits without capablity
       [not found] ` <0dc571a8-e1b2-4247-9e9d-df02c0b0d7c6.yuanliang.wyl@alibaba-inc.com>
@ 2018-01-10 11:59   ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2018-01-10 11:59 UTC (permalink / raw)
  To: Yuanliang Wang
  Cc: Theodore Ts'o, adilger.kernel, pkuelelixi, jack, linux-ext4,
	linux-kernel

Hello Wang!

On Wed 10-01-18 19:01:03, Yuanliang Wang wrote:
> Thank you for your enthusiastic response
> 
> the reason is :
>                         1、I saw
> that ignore_hardlimit allows root to exceed the limit,so should projid
> be consistent ?

Generally, it should be consistent. ignore_hardlimit is a different thing -
you want root to be able to exceed storage space limit but you don't want
root to be able to make information inconsistent...

>                         2、
> In our scenario we will use hardlink to share data between container and host, and between containers
> 
>                                         +------------------+
>                                         |                       |
>                                         |                       |
> +-------------+                     |                       |
> |                 |                     |                       |
> |                 |                     |     container     |
> |                 +--------------> |                       |
> |                 |                     |     file A          |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     +------------------+
> |                 |
> |                 |
> |                 |                     +------------------+
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     |    container      |
> | host file A +---------------> |                       |
> |                 |                     |    file A           |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     +------------------+
> |                 |
> |                 |                     +------------------+
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 +------------->  |     container     |
> |                 |                     |                       |
> |                 |                     |                       |
> |                 |                     |    file A            |
> |                 |                     |                       |
> +-------------+                     |                       |
>                                         |                       |
>                                         +------------------+

I see but then which project ID does the 'file A' have? Project ID used for
neither of the containers is logical... Maybe the file is accessible only
read-only in your setup and so you don't care much about quotas for that
particular files but still it may be confusing that the file is not
accounted to the quota of each particular container. That's the reason why
project ID consistence is enforced.

								Honza
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-01-10 11:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <c18ff577-be92-40ea-93ae-4401ce2107da.yuanliang.wyl@alibaba-inc.com>
2018-01-05 19:20 ` ext4, quota, projectid: limits without capablity Theodore Ts'o
     [not found] ` <0dc571a8-e1b2-4247-9e9d-df02c0b0d7c6.yuanliang.wyl@alibaba-inc.com>
2018-01-10 11:59   ` 回复:ext4, " Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.