Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1216037

Re: [PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state

From Alexandru Moise <00moses.alexander00@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state
Date 2015-08-31 08:40 +0200
Message-ID <q3qV3-8aa-5@gated-at.bofh.it> (permalink)
References <q2JZM-56x-1@gated-at.bofh.it> <q3moq-1wF-13@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Mon, Aug 31, 2015 at 09:44:49AM +0800, Qu Wenruo wrote:
> >>    >From the perspective of users, qgroup's referenced or exclusive
> >>    is negative,but user can not continue to write data! a workaround
> >>    way is to cast u64 to s64 when doing qgroup reservation
> >
> >I am unable to reproduce this problem without his modification.
> >I could be wrong in reverting this, so I'm gonna CC Wang as well so
> >he is aware of this patch.
> 
> The cast is a workaround for a quite old qgroup bug, which will
> cause excl/rfer overflow to minus.
> 
> The remove of cast rfer/exel now is OK, as qgroup keeps maturing,
> especially after 4.2-rc1 rfer/exel will keep sane under most case
> (exception will be qgroup reassign and subvolume deletion, but will
> not case minus value even under than case).

rfer/exel and reserved are all of type unsigned int, how exactly would
they overflow to minus?

> 
> But I'm not a fan to remove it now.
> As qgroup still has a known huge bug for the qg->reserved part, we
> are aware of it and working on it actively.

Can you tell me more about this known huge bug and how you can
reproduce it using the present implementation?

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state Alexandru Moise <00moses.alexander00@gmail.com> - 2015-08-29 10:50 +0200
  Re: [PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state Qu Wenruo <quwenruo@cn.fujitsu.com> - 2015-08-31 03:50 +0200
    Re: [PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state Alexandru Moise <00moses.alexander00@gmail.com> - 2015-08-31 08:40 +0200
      Re: [PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state Alexandru Moise <00moses.alexander00@gmail.com> - 2015-08-31 09:00 +0200
      Re: [PATCH] btrfs: Remove unneeded cast to s64 for qgroup rfer state Qu Wenruo <quwenruo@cn.fujitsu.com> - 2015-08-31 09:00 +0200

csiph-web