* [PATCH] xfs: simplify the flags setting in xfs_qm_scall_quotaon
@ 2020-04-10 8:57 xiakaixu1987
2020-04-10 14:51 ` Darrick J. Wong
0 siblings, 1 reply; 5+ messages in thread
From: xiakaixu1987 @ 2020-04-10 8:57 UTC (permalink / raw)
To: linux-xfs; +Cc: darrick.wong, Kaixu Xia
From: Kaixu Xia <kaixuxia@tencent.com>
Simplify the setting of the flags value, and only consider
quota enforcement stuff here.
Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
---
fs/xfs/xfs_qm_syscalls.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
index 5d5ac65..944486f 100644
--- a/fs/xfs/xfs_qm_syscalls.c
+++ b/fs/xfs/xfs_qm_syscalls.c
@@ -357,11 +357,11 @@
int error;
uint qf;
- flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
/*
- * Switching on quota accounting must be done at mount time.
+ * Switching on quota accounting must be done at mount time,
+ * only consider quota enforcement stuff here.
*/
- flags &= ~(XFS_ALL_QUOTA_ACCT);
+ flags &= XFS_ALL_QUOTA_ENFD;
if (flags == 0) {
xfs_debug(mp, "%s: zero flags, m_qflags=%x",
--
1.8.3.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: simplify the flags setting in xfs_qm_scall_quotaon
2020-04-10 8:57 [PATCH] xfs: simplify the flags setting in xfs_qm_scall_quotaon xiakaixu1987
@ 2020-04-10 14:51 ` Darrick J. Wong
2020-04-11 1:09 ` kaixuxia
0 siblings, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2020-04-10 14:51 UTC (permalink / raw)
To: xiakaixu1987; +Cc: linux-xfs, Kaixu Xia
On Fri, Apr 10, 2020 at 04:57:04PM +0800, xiakaixu1987@gmail.com wrote:
> From: Kaixu Xia <kaixuxia@tencent.com>
>
> Simplify the setting of the flags value, and only consider
> quota enforcement stuff here.
>
> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
> ---
> fs/xfs/xfs_qm_syscalls.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
> index 5d5ac65..944486f 100644
> --- a/fs/xfs/xfs_qm_syscalls.c
> +++ b/fs/xfs/xfs_qm_syscalls.c
> @@ -357,11 +357,11 @@
No idea which function this is. diff -p, please.
Also, please consider putting all these minor cleanups into a single
patchset, it's a lot easier (for me) to track and land one series than
it is to handle a steady trickle of single patches.
--D
> int error;
> uint qf;
>
> - flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
> /*
> - * Switching on quota accounting must be done at mount time.
> + * Switching on quota accounting must be done at mount time,
> + * only consider quota enforcement stuff here.
> */
> - flags &= ~(XFS_ALL_QUOTA_ACCT);
> + flags &= XFS_ALL_QUOTA_ENFD;
>
> if (flags == 0) {
> xfs_debug(mp, "%s: zero flags, m_qflags=%x",
> --
> 1.8.3.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: simplify the flags setting in xfs_qm_scall_quotaon
2020-04-10 14:51 ` Darrick J. Wong
@ 2020-04-11 1:09 ` kaixuxia
2020-04-11 3:18 ` Darrick J. Wong
0 siblings, 1 reply; 5+ messages in thread
From: kaixuxia @ 2020-04-11 1:09 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs, Kaixu Xia
On 2020/4/10 22:51, Darrick J. Wong wrote:
> On Fri, Apr 10, 2020 at 04:57:04PM +0800, xiakaixu1987@gmail.com wrote:
>> From: Kaixu Xia <kaixuxia@tencent.com>
>>
>> Simplify the setting of the flags value, and only consider
>> quota enforcement stuff here.
>>
>> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
>> ---
>> fs/xfs/xfs_qm_syscalls.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
>> index 5d5ac65..944486f 100644
>> --- a/fs/xfs/xfs_qm_syscalls.c
>> +++ b/fs/xfs/xfs_qm_syscalls.c
>> @@ -357,11 +357,11 @@
>
> No idea which function this is. diff -p, please.
Yeah, the changed function is xfs_qm_scall_quotaon().
Anyway, the result of diff -p as follows,
*** fs/xfs/xfs_qm_syscalls.c Sat Apr 11 08:32:03 2020
--- /tmp/xfs_qm_syscalls.c Sat Apr 11 08:31:51 2020
*************** xfs_qm_scall_quotaon(
*** 357,367 ****
int error;
uint qf;
/*
! * Switching on quota accounting must be done at mount time,
! * only consider quota enforcement stuff here.
*/
! flags &= XFS_ALL_QUOTA_ENFD;
if (flags == 0) {
xfs_debug(mp, "%s: zero flags, m_qflags=%x",
--- 357,367 ----
int error;
uint qf;
+ flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
/*
! * Switching on quota accounting must be done at mount time.
*/
! flags &= ~(XFS_ALL_QUOTA_ACCT);
if (flags == 0) {
xfs_debug(mp, "%s: zero flags, m_qflags=%x",
>
> Also, please consider putting all these minor cleanups into a single
> patchset, it's a lot easier (for me) to track and land one series than
> it is to handle a steady trickle of single patches.
Yeah, got it. Should I resend all of the patches that have been
reviewed or just resend the last two patches with a single patchset?
The patches that have been reviewed as follows,
xfs: trace quota allocations for all quota types
xfs: combine two if statements with same condition
xfs: check if reserved free disk blocks is needed
xfs: remove unnecessary variable udqp from xfs_ioctl_setattr
The last two patches that have not been reviewed as follow,
xfs: remove unnecessary assertion from xfs_qm_vop_create_dqattach
xfs: simplify the flags setting in xfs_qm_scall_quotaon
>
> --D
>
>> int error;
>> uint qf;
>>
>> - flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
>> /*
>> - * Switching on quota accounting must be done at mount time.
>> + * Switching on quota accounting must be done at mount time,
>> + * only consider quota enforcement stuff here.
>> */
>> - flags &= ~(XFS_ALL_QUOTA_ACCT);
>> + flags &= XFS_ALL_QUOTA_ENFD;
>>
>> if (flags == 0) {
>> xfs_debug(mp, "%s: zero flags, m_qflags=%x",
>> --
>> 1.8.3.1
>>
--
kaixuxia
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: simplify the flags setting in xfs_qm_scall_quotaon
2020-04-11 1:09 ` kaixuxia
@ 2020-04-11 3:18 ` Darrick J. Wong
2020-04-11 5:08 ` kaixuxia
0 siblings, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2020-04-11 3:18 UTC (permalink / raw)
To: kaixuxia; +Cc: linux-xfs, Kaixu Xia
On Sat, Apr 11, 2020 at 09:09:57AM +0800, kaixuxia wrote:
>
> On 2020/4/10 22:51, Darrick J. Wong wrote:
> > On Fri, Apr 10, 2020 at 04:57:04PM +0800, xiakaixu1987@gmail.com wrote:
> >> From: Kaixu Xia <kaixuxia@tencent.com>
> >>
> >> Simplify the setting of the flags value, and only consider
> >> quota enforcement stuff here.
> >>
> >> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
> >> ---
> >> fs/xfs/xfs_qm_syscalls.c | 6 +++---
> >> 1 file changed, 3 insertions(+), 3 deletions(-)
> >>
> >> diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
> >> index 5d5ac65..944486f 100644
> >> --- a/fs/xfs/xfs_qm_syscalls.c
> >> +++ b/fs/xfs/xfs_qm_syscalls.c
> >> @@ -357,11 +357,11 @@
> >
> > No idea which function this is. diff -p, please.
>
> Yeah, the changed function is xfs_qm_scall_quotaon().
> Anyway, the result of diff -p as follows,
That was a request to generate your patches with diff -Naurp.
--D
> *** fs/xfs/xfs_qm_syscalls.c Sat Apr 11 08:32:03 2020
> --- /tmp/xfs_qm_syscalls.c Sat Apr 11 08:31:51 2020
> *************** xfs_qm_scall_quotaon(
> *** 357,367 ****
> int error;
> uint qf;
>
> /*
> ! * Switching on quota accounting must be done at mount time,
> ! * only consider quota enforcement stuff here.
> */
> ! flags &= XFS_ALL_QUOTA_ENFD;
>
> if (flags == 0) {
> xfs_debug(mp, "%s: zero flags, m_qflags=%x",
> --- 357,367 ----
> int error;
> uint qf;
>
> + flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
> /*
> ! * Switching on quota accounting must be done at mount time.
> */
> ! flags &= ~(XFS_ALL_QUOTA_ACCT);
>
> if (flags == 0) {
> xfs_debug(mp, "%s: zero flags, m_qflags=%x",
>
> >
> > Also, please consider putting all these minor cleanups into a single
> > patchset, it's a lot easier (for me) to track and land one series than
> > it is to handle a steady trickle of single patches.
> Yeah, got it. Should I resend all of the patches that have been
> reviewed or just resend the last two patches with a single patchset?
>
> The patches that have been reviewed as follows,
> xfs: trace quota allocations for all quota types
> xfs: combine two if statements with same condition
> xfs: check if reserved free disk blocks is needed
> xfs: remove unnecessary variable udqp from xfs_ioctl_setattr
>
> The last two patches that have not been reviewed as follow,
> xfs: remove unnecessary assertion from xfs_qm_vop_create_dqattach
> xfs: simplify the flags setting in xfs_qm_scall_quotaon
>
> >
> > --D
> >
> >> int error;
> >> uint qf;
> >>
> >> - flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
> >> /*
> >> - * Switching on quota accounting must be done at mount time.
> >> + * Switching on quota accounting must be done at mount time,
> >> + * only consider quota enforcement stuff here.
> >> */
> >> - flags &= ~(XFS_ALL_QUOTA_ACCT);
> >> + flags &= XFS_ALL_QUOTA_ENFD;
> >>
> >> if (flags == 0) {
> >> xfs_debug(mp, "%s: zero flags, m_qflags=%x",
> >> --
> >> 1.8.3.1
> >>
>
> --
> kaixuxia
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] xfs: simplify the flags setting in xfs_qm_scall_quotaon
2020-04-11 3:18 ` Darrick J. Wong
@ 2020-04-11 5:08 ` kaixuxia
0 siblings, 0 replies; 5+ messages in thread
From: kaixuxia @ 2020-04-11 5:08 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: linux-xfs, Kaixu Xia
On 2020/4/11 11:18, Darrick J. Wong wrote:
> On Sat, Apr 11, 2020 at 09:09:57AM +0800, kaixuxia wrote:
>>
>> On 2020/4/10 22:51, Darrick J. Wong wrote:
>>> On Fri, Apr 10, 2020 at 04:57:04PM +0800, xiakaixu1987@gmail.com wrote:
>>>> From: Kaixu Xia <kaixuxia@tencent.com>
>>>>
>>>> Simplify the setting of the flags value, and only consider
>>>> quota enforcement stuff here.
>>>>
>>>> Signed-off-by: Kaixu Xia <kaixuxia@tencent.com>
>>>> ---
>>>> fs/xfs/xfs_qm_syscalls.c | 6 +++---
>>>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>>>
>>>> diff --git a/fs/xfs/xfs_qm_syscalls.c b/fs/xfs/xfs_qm_syscalls.c
>>>> index 5d5ac65..944486f 100644
>>>> --- a/fs/xfs/xfs_qm_syscalls.c
>>>> +++ b/fs/xfs/xfs_qm_syscalls.c
>>>> @@ -357,11 +357,11 @@
>>>
>>> No idea which function this is. diff -p, please.
>>
>> Yeah, the changed function is xfs_qm_scall_quotaon().
>> Anyway, the result of diff -p as follows,
>
> That was a request to generate your patches with diff -Naurp.
Got it, I will resend all the patches that have not been applied by
the xfs for-next branch with a single patchset.
>
> --D
>
>> *** fs/xfs/xfs_qm_syscalls.c Sat Apr 11 08:32:03 2020
>> --- /tmp/xfs_qm_syscalls.c Sat Apr 11 08:31:51 2020
>> *************** xfs_qm_scall_quotaon(
>> *** 357,367 ****
>> int error;
>> uint qf;
>>
>> /*
>> ! * Switching on quota accounting must be done at mount time,
>> ! * only consider quota enforcement stuff here.
>> */
>> ! flags &= XFS_ALL_QUOTA_ENFD;
>>
>> if (flags == 0) {
>> xfs_debug(mp, "%s: zero flags, m_qflags=%x",
>> --- 357,367 ----
>> int error;
>> uint qf;
>>
>> + flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
>> /*
>> ! * Switching on quota accounting must be done at mount time.
>> */
>> ! flags &= ~(XFS_ALL_QUOTA_ACCT);
>>
>> if (flags == 0) {
>> xfs_debug(mp, "%s: zero flags, m_qflags=%x",
>>
>>>
>>> Also, please consider putting all these minor cleanups into a single
>>> patchset, it's a lot easier (for me) to track and land one series than
>>> it is to handle a steady trickle of single patches.
>> Yeah, got it. Should I resend all of the patches that have been
>> reviewed or just resend the last two patches with a single patchset?
>>
>> The patches that have been reviewed as follows,
>> xfs: trace quota allocations for all quota types
>> xfs: combine two if statements with same condition
>> xfs: check if reserved free disk blocks is needed
>> xfs: remove unnecessary variable udqp from xfs_ioctl_setattr
>>
>> The last two patches that have not been reviewed as follow,
>> xfs: remove unnecessary assertion from xfs_qm_vop_create_dqattach
>> xfs: simplify the flags setting in xfs_qm_scall_quotaon
>>
>>>
>>> --D
>>>
>>>> int error;
>>>> uint qf;
>>>>
>>>> - flags &= (XFS_ALL_QUOTA_ACCT | XFS_ALL_QUOTA_ENFD);
>>>> /*
>>>> - * Switching on quota accounting must be done at mount time.
>>>> + * Switching on quota accounting must be done at mount time,
>>>> + * only consider quota enforcement stuff here.
>>>> */
>>>> - flags &= ~(XFS_ALL_QUOTA_ACCT);
>>>> + flags &= XFS_ALL_QUOTA_ENFD;
>>>>
>>>> if (flags == 0) {
>>>> xfs_debug(mp, "%s: zero flags, m_qflags=%x",
>>>> --
>>>> 1.8.3.1
>>>>
>>
>> --
>> kaixuxia
--
kaixuxia
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2020-04-11 5:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-10 8:57 [PATCH] xfs: simplify the flags setting in xfs_qm_scall_quotaon xiakaixu1987
2020-04-10 14:51 ` Darrick J. Wong
2020-04-11 1:09 ` kaixuxia
2020-04-11 3:18 ` Darrick J. Wong
2020-04-11 5:08 ` kaixuxia
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox