| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
upstream_on_quota
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Details:
--------
In init, we should create an rpc only when quota is enabled
on the volume.
In reconfigure, we should reuse the enforcer rpc, if any, on
enable. On disable, we should disable the enforcer rpc, if present.
Change-Id: I03e9f7b2b6dfecd1e8d97f0fb2df3db717e4ad50
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
|
| |
| |
| |
| |
| |
| |
| | |
Change-Id: Ib903ec47739a80168981b3c38ef6ea36ca3ab29a
BUG: 969461
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Signed-off-by: Varun Shastry <vshastry@redhat.com>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Commit makes the following changes to the source.
i. Updating hard link count for parent dir should be configurable. Starts
working only when the quota is enabled.
ii. Heal nlinks of pgfid xattr in lookup.
iii. Start quota crawler without readdirp optimization.
iv. Rename: Handle the internal fops properly. Use GLUSTERFS_INTERNAL_FOP_KEY
for representing the internal fops.
Change-Id: Ic6586a82a8bb6eb4329eb6cbd5430da11418e753
BUG: 969461
Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
Signed-off-by: Varun Shastry <vshastry@redhat.com>
|
|\
| |
| |
| | |
upstream_on_quota
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The code adjusts the statvfs values if the quota-deem-statfs option is enabled.
i. Adjust statvfs based on limit configured on root.
ii. If limit is set on the inode passed, use size/limits on that inode to
populate statvfs. Otherwise, use size/limits configured on root.
iii. Upon statvfs, update the ctx->size on the inode.
iv. Don't let DHT aggregate, instead take the maximum of the usages from the
subvols of the DHT, since each of it contains the complete information.
Change-Id: Id43c5432be56b70c22c040a9b7f674ddddc9f930
BUG: 969461
Signed-off-by: Varun Shastry <vshastry@redhat.com>
|
|/
|
|
|
|
|
|
| |
contribution node creation for root
Change-Id: I201a6dddab2258ae3f536281bb0fd17040d8c54e
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
|
|
|
|
|
|
|
| |
Current code compared only the first strlen (xlator_name) characters
with volume_uuid. This can result in picking up a wrong subvol which
has the first strlen (xlator_name) characters same as volume_uuid.
Change-Id: I81bf251c0603ccfe2bd60b75d2e040f13b135669
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
|
|
|
|
|
|
|
|
| |
This patch addresses the issues we might run into in the time-window
between crawler starts to build quota state and the crawler actually
reaches the inode. In this time-window, quota is enabled but context
of the inode in question is not populated.
Change-Id: I10ba66d9aa3680e6c46f8f599e77fc39cc9601c5
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
|
|
|
|
|
|
| |
Original-author: Krishnan Parthasarathi <kparthas@redhat.com>
Change-Id: I07797fb5402dba89f81a7d2b8b20a11db74f69c9
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|\
| |
| |
| | |
upstream_on_quota
|
| |
| |
| |
| |
| | |
Change-Id: Ibe7de155bb5be21ab2da2beed75eec86e9a2f001
Signed-off-by: Varun Shastry <vshastry@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I60f93727f04f1d16edfc7efdcb4e1c501ec760fa
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For correct functioning of marker we need a parent/pargfid.
Change-Id: Ie1a0fb3a5b9b12091e1ea749cbf15342a5f933db
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/11947
Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Its valid that directories on which limit is not set, to not have
inode ctx NULL, since it servers no purpose.
Change-Id: I0e31de7ffbfcb65cddf590833756ff11bab64434
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/11830
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This patch also fixes a potential race-condition while accessing
dentry list stored in inode context while updating size and enforcing
limits.
Change-Id: I76c85fe782f6a53d74b453dd7dcb893e33003620
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We used to calculate delta as,
delta = (postbuf->ia_blocks - prebuf->ia_blocks) * 512;
However this can result in some blocks getting accounted twice in a
multithreaded environment. This is because at storage/posix, we dont
do,
* stat (file, &prebuf)
* write ()
* stat (file, &postbuf)
as a single atomic operation. So, stat in step 3, can account for some
blocks which are allocated as part of a parallel write.
One of the possible fixes is to make these three operations by holding
a lock. However, this is too costly operation and hence quota relies
on size of the vector being written (with the check that if post and
pre block count are same, entire write was accomodated in existing
blocks). This seems to be acceptable since we don't solely rely on
size_updation by quota-enforcer (we do fetch aggregated size from
quotad after a timeout).
Change-Id: Ifdc8174c77058322aca8f589f7558641b73f0bc1
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
Reviewed-on: https://code.engineering.redhat.com/gerrit/11829
Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Tested-by: Vijay Bellur <vbellur@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Ic31b77192d7cc21462f6b0eeee2938109681ca55
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Also removes QUOTA_UPDATE_USAGE_KEY
Change-Id: I71080eda562f8f4d451c4911f833de9048031da9
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I49798f8b84a260e72bed722e08af6a194005dec1
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I1aa76e6155876e0dcd996bf037ad76cbb17a0ac1
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I807ef0616af3f0f83d3c14e92cc93f5c765908af
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: Iccc4aefebda7d1cd029642adf08806befadd14ad
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I33d45521a06f008554cb43a3d6b53136b2f091d2
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: If9b4a9e9c2c153895129b6ed44ebee416f3da75c
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@redhat.com>
|
| |
| |
| |
| |
| |
| | |
Change-Id: I8a224a332777d9e2506d6211606f10149ea537e0
BUG: 969461
Signed-off-by: Raghavendra G <rgowdapp@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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Change-Id: I1cb7eb190f52f6eba015c6fc25621ee7a5a05c26
Signed-off-by: Vijay Bellur <vbellur@redhat.com>
|
|
|
|
|
| |
Change-Id: I50d2eff0b3114f5ac91164815b308a441cd8800e
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>
|
|/
|
|
|
|
|
|
| |
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: 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>
|
|
|
|
|
|
|
| |
Original-author: Vijay Bellur <vbellur@redhat.com>
Change-Id: Iea21ef1cdfb78c79482ad02f81734516b7818714
Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
|
|
|
|
|
|
|
|
|
| |
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
|