| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|\ \ \
| |/ /
|/| |
| | | |
upstream_on_quota
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
TODO:
* Need to foreground the "dd" after volume-start command
Change-Id: I4ff09f80bf63d88c0449f7b965cd61815542919e
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|\ \ \ |
|
| | |/
| |/|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Setting quota limits on a given directory will cause glusterd to
persist the gfid of the path in WD/vols/<volname>/quota.conf.
Also, executing 'quota remove' will cause glusterd to remove
the gfid of the given path.
This is needed for implementing the 'list-all' variant of 'quota list'
command.
To-Do:
1. Exchange quota.conf when a new node is added into the cluster;
2. Unlink quota.conf on disabling quota (?)
Change-Id: I7d75a9cdb43e4e1389ddb08ffe09b294d36f87d8
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
A getxattr on key GET_ANCESTRY_DENTRY_KEY to storage/posix would
return a list of direntries which can be used to construct inode
contexts of individual translators. The result of getxattr on this key
can be viewed as similar to readdirp_cbk with the difference that the
dentries returned here represent various paths from that inode till
root rather than the children of a directory.
This patch also modifies marker/quota and enforcer to utilize this
key.
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Change-Id: I7132e7d56f2fac0f8749f51227d9f2ef27f9d354
BUG: 969461
|
| | |
| | |
| | |
| | |
| | |
| | | |
Change-Id: I960cf42c3cacecb9d1cdb258e063b8691a16ca20
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
a parent cannot be found for an inode.
Quota enforcement requires checking of limits on all ancestors till
root. With anonymous fds and nameless lookups, all the ancestors may
not be populated in inode table. A getxattr on key GET_PATH_KEY would
make storage/posix to construct the dentry chain till root.
Change-Id: I1e2172c28a9c7eb918fe41b63b30209733df148c
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The following is an attempt to generate the paths of a file when only its
gfid is known.
To find the path of a directory, the symlink handle to the directory
maintained in the ".glusterfs" backend directory is read. The symlink handle
is generated using the gfid of the directory. It (handle) contains the
directory's name and parent gfid, which are used to recursively construct
the absolute path as seen by the user from the mount point.
A similar approach cannot be used for a regular file or a symbolic link
since its hardlink handle, generated using its gfid, doesn't contain its
parent gfid and basename. So xattrs are set to store the parent gfids and
the number of hardlinks to a file or a symlink having the same parent gfid.
When an user/application requests for the paths of a regular file or a symlink
with multiple hardlinks, using the parent gfids stored in the xattrs, the paths
of the parent directories are generated as mentioned earlier. The base names of
the hardlinks (with the same parent gfid) are determined by matching the actual
backend inode numbers of each entry in the parent directory with that of the
hardlink handle.
Xattr is set on a regular file, link, and symbolic link as follows,
Xattr name : trusted.pgfid.<pargfidstr>
Xattr value : <number of hardlinks to a regular file/symlink
with the same parentgfid>
If a regular file, hard link, symbolic link is created then an xattr in the above
format is set in the backend. The path of a file can be found by getting the
value of the virtual xattr named "glusterfs.getpath". The multiple hardlinks of
a file or a symlink are displayed as a colon seperated list (this could interfere
with path components containing ':'.)
e.g. In Gluster file system, a filename "file1" in the root directory with
hardlinks "/dir2/link2tofile1" and "/dir1/link1tofile1" are created.
[root@alpha gfsmntpt]# getfattr -n glusterfs.getpath -e text file1
glusterfs.getpath="/file1:/dir2/link2tofile1:/dir1/link1tofile1"
Thanks Amar, Avati and Venky for the inputs.
Change-Id: I2304a50db9b0f73fbea2ca01b61c8a598d464da6
BUG: 990028
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Original Author: Ramana Raja <rraja@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
distribute xlator does the below operations as internal fops for rename
FOP: rename a -> b
link b
unlink a
distribute sends the above link and unlink fops as internal fops. Quota
xlator upon seeing link and unlink as internal fops does not add/remove
the entries to/from the inode context. So when unlink comes, even though
the fop is internal fop, go through the list of names in the context and
if the name of the entry being unlinked is found in the list, then remove
it from the list.
Change-Id: I9a57e3b9c295f7fce6a9e952a24b59897e856e98
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
|
|\
| |
| |
| | |
upstream_on_quota
|
| |
| |
| |
| |
| | |
Change-Id: I1cb7eb190f52f6eba015c6fc25621ee7a5a05c26
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|\ \
| |/
|/|
| | |
upstream_on_quota
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously
struct foo {
int a;
int b;
} bar1, bar2 = {0,};
inited only members of bar2 to 0.
This has been set right. Also added verification tests for soft-quota
configuration.
Change-Id: I9e3b4d65286e59d7dad8db8fa649b1b91a5d25bc
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|/
|
|
|
| |
Change-Id: I50d2eff0b3114f5ac91164815b308a441cd8800e
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|\ |
|
| |
| |
| |
| |
| | |
Change-Id: I366328aab53e960004f988befd2bcc1d2aa4c48d
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|\| |
|
| |
| |
| |
| |
| | |
Change-Id: I510a3f068ab141a707fd6535d51d4b3fa37930f0
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|\| |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also contains parts of http://review.gluster.org/5389 which have not
yet been pulled in.
Change-Id: I9fca5f2082b86da357478e6adde52c5a0abacd39
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|\ \ |
|
| |/
| |
| |
| |
| | |
Change-Id: I72e97bf57bd4103506324b5caf8dffb3fd7d7f71
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|/
|
|
|
|
|
|
| |
Also handled reconfigure event for quota options such as
soft-timeout, hard-timeout and alert-time
Change-Id: I5dfdb76901d4f3af824b30838318268e5edcee34
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
|
|
| |
Change-Id: If1773603bcc5b393796e96439929e7fd2867127a
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
|
|
|
| |
Original-author: Raghavendra Gowdappa <rgowdapp@redhat.com>
Change-Id: I245f1914a38332b8e5e7f1581c9437cf5a9ab6f0
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
|
|
| |
Change-Id: I0e3946ef1cec20bf3a475e7ade038520eed0926b
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
| |
backend
Change-Id: I9229899361794d48bb2f741fb989bf025081987f
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
| |
With this patch, upon disablement of quota on a given volume, the auxiliary
mounts if present are removed on every node by glusterd during commit op.
Change-Id: Ie50fda8da28635f3f65a25106e2277b4a2fc45f9
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The CLI now performs a mount everytime any one of the following
quota commands are issued:
a. enable
b. limit-usage
c. list
d. remove
The pidfile of the auxiliary mount process will be placed under
DEFAULT_VAR_RUN_DIRECTORY and will be named <volname>.pid
Change-Id: I09709ea5c0c59871c33544dee7e691f6cd0ecef3
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
| |
Change-Id: I3ce0bb417b6faa9430689039741d0477cb7a582f
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
| |
Change-Id: I7fce33e7d1c075b9610df7f6e9db1cc862630170
BUG: 969461
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
|
|
| |
Change-Id: I96cbe03511cbecb112418da82c44c00fbab74ba3
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
| |
Change-Id: If9bb12b352af5a691bd17fc51f0273685ecb12e8
BUG: 969461
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
|
|
| |
Change-Id: If65129812b10afc19a22b2b0c468b53043bde1db
BUG: 969461
|
|
|
|
|
| |
Change-Id: I1133c5ca24f2b395103d470bde77be966d17d938
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
|
|
|
|
|
| |
- dumps members of quota_priv_t.
- also added validation count to keep track of number of validations done.
Change-Id: I998fcccacf4bd7c61ead9ca9a489e0dc0e73763a
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
|
|
|
|
|
| |
Also changed default soft-limit percentage to 80% of
configured quota limit.
Change-Id: Ia07b569216189a6e3bedb5cdbf8ffeb9f7739444
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
A few little hacks to set the volume id on the quota server and
a mapping option on quotad to map the volume name to the uuid passed
via the lookup request.
Change-Id: Ic151acb18ed29d2ee4ae5d1bc6841ae4a4de176a
Original-author: Brian Foster <bfoster@redhat.com>
Signed-off-by: Brian Foster <bfoster@redhat.com>
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following are the compilation warnings I encountered:
-----------------------------------
In file included from quota.c:12:0:
quota.h:190:1: error: 'packed' attribute ignored [-Werror=attributes]
quota.c: In function 'quota_lookup_cbk':
quota.c:618:23: error: assignment from incompatible pointer type [-Werror]
quota.c:637:53: error: 'soft_lim' undeclared (first use in this function)
quota.c:637:53: note: each undeclared identifier is reported only once for each function it appears in
quota.c:608:28: error: unused variable 'size' [-Werror=unused-variable]
cc1: all warnings being treated as errors
-----------------------------------
Change-Id: I7a09e654a9cc064a423a5f8362f2a9c6abbc7edb
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
* send size query to quotad only if limit is set on that inode.
* don't check for loc->parent while querying size from quotad, since
its a nameless lookup
Change-Id: I10dc2f9d1e40875382040b53cb4ee5f6d9a27133
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
It was assumed that hard and soft limits are stored as two different
xattrs on disk. However they are stored as two members of a structure
which is stored as a value for a single key.
Change-Id: I947fa5c375209c31fe1511bda0d5cb0e249af9ba
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
|
|
| |
Change-Id: Ia37020c3aa11af6eed3af09cfe390b848b028b6a
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
... and also fix cli logging
In glusterd_op_quota(),
* do not modify ret after going to 'out' as this causes the failure
status (-1) to be overwritten, thereby causing the command to return
0 even on failure.
* knock off additional labels like create_vol.
* replace 'if' statements with 'switch case' statement.
* delete only the 3 timeouts and the defaul-soft-limit, if present,
from volinfo->dict, upon disablement of quota.
Change-Id: If486a5373b66f2379d6d041a974d9b824fcb8518
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
| |
Change-Id: Ifdc60071146587dc5c60d9a53a92d49b3487fd82
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
| |
Change-Id: I5f680675576aeec584b497eb25dd804a9dd6d690
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
| |
Original-author: Vijay Bellur <vbellur@redhat.com>
Change-Id: Iea21ef1cdfb78c79482ad02f81734516b7818714
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
| |
Change-Id: I8a6d49cc101da219404633d43b8d211f816094a7
|
|
|
|
|
|
|
|
|
| |
Don't block the gluster internal processes like rebalance, gsyncd, self heal
etc from the disk quotas and the xattrs setting.
Solution: Allow all the clients with negative PID.
Change-Id: Iaeaa8096e00d48b2a4c3f5df61d103da0b3d6598
|
|
|
|
| |
Change-Id: Ie0b3af8b52f2d909c61094bdcaccfd724ff4ecc0
|
|
|
|
| |
Change-Id: I38077c7adc497b314f4037cbbb116458a26ed589
|