diff mbox

[RESEND] md:Remove no longer needed fix me comment in dm-region-hash.c for removing the structure pointer, *rh from the definiton of dm_region

Message ID 1421723781-21984-1-git-send-email-xerofoify@gmail.com (mailing list archive)
State Rejected, archived
Delegated to: Mike Snitzer
Headers show

Commit Message

Nick Jan. 20, 2015, 3:16 a.m. UTC
Removes the no longer needed fix me comment questioning if we need to remove
the structure pointer,rh as defined as a structure of type dsm_region_hash
from the definition of the structure, dm_region. Furthermore this  pointer is
needed in order for various functions to run and build successfully in the file,
dm-region-hash.c.

Signed-off-by: Nicholas Krause <xerofoify@gmail.com>
---
 drivers/md/dm-region-hash.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Alasdair G Kergon Jan. 20, 2015, 11:19 a.m. UTC | #1
On Mon, Jan 19, 2015 at 10:16:21PM -0500, Nicholas Krause wrote:
> Removes the no longer needed fix me comment questioning if we need to remove
> the structure pointer,rh as defined as a structure of type dsm_region_hash
> from the definition of the structure, dm_region. Furthermore this  pointer is
> needed in order for various functions to run and build successfully in the file,
> dm-region-hash.c.
 
You've misunderstood the comment!
Is there a better alternative to having every dm_region struct store its own copy of
this pointer?

Alasdair

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Nick Jan. 20, 2015, 11:36 a.m. UTC | #2
Alasdair,
Unless we use a union or something similar there seems to be no easy 
way without rewriting a lot of an already function driver file.
Cheers,
Nick

On 2015-01-20 06:19 AM, Alasdair G Kergon wrote:
> On Mon, Jan 19, 2015 at 10:16:21PM -0500, Nicholas Krause wrote:
>> Removes the no longer needed fix me comment questioning if we need to remove
>> the structure pointer,rh as defined as a structure of type dsm_region_hash
>> from the definition of the structure, dm_region. Furthermore this  pointer is
>> needed in order for various functions to run and build successfully in the file,
>> dm-region-hash.c.
>  
> You've misunderstood the comment!
> Is there a better alternative to having every dm_region struct store its own copy of
> this pointer?
> 
> Alasdair
> 

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Alasdair G Kergon Jan. 20, 2015, 11:40 a.m. UTC | #3
On Tue, Jan 20, 2015 at 06:36:10AM -0500, nick wrote:
> Unless we use a union or something similar there seems to be no easy 
> way without rewriting a lot of an already function driver file.

The comment does not restrict itself to 'easy ways'.

Alasdair


--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Nick Jan. 20, 2015, 1:17 p.m. UTC | #4
On Tue, Jan 20, 2015 at 6:40 AM, Alasdair G Kergon <agk@redhat.com> wrote:
> On Tue, Jan 20, 2015 at 06:36:10AM -0500, nick wrote:
>> Unless we use a union or something similar there seems to be no easy
>> way without rewriting a lot of an already function driver file.
>
> The comment does not restrict itself to 'easy ways'.
>
> Alasdair
>
>
Then I suggest that I look into this form. Sorry about wasting your time.
Nick

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
Nick Jan. 26, 2015, 8:09 p.m. UTC | #5
On Tue, Jan 20, 2015 at 8:17 AM, Nick Krause <xerofoify@gmail.com> wrote:
> On Tue, Jan 20, 2015 at 6:40 AM, Alasdair G Kergon <agk@redhat.com> wrote:
>> On Tue, Jan 20, 2015 at 06:36:10AM -0500, nick wrote:
>>> Unless we use a union or something similar there seems to be no easy
>>> way without rewriting a lot of an already function driver file.
>>
>> The comment does not restrict itself to 'easy ways'.
>>
>> Alasdair
>>
>>
> Then I suggest that I look into this form. Sorry about wasting your time.
> Nick
Alasdir,
After thinking about this for a while, there seems to no way unless we
rewrite this driver and most of the functions. This is due to lots of
callers on this pointer.
Further more due to this I assume either removing the FIXME or
investigating how much memory these pointers use under various
workloads.
Nick

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
diff mbox

Patch

diff --git a/drivers/md/dm-region-hash.c b/drivers/md/dm-region-hash.c
index b929fd5..823d56f 100644
--- a/drivers/md/dm-region-hash.c
+++ b/drivers/md/dm-region-hash.c
@@ -99,7 +99,7 @@  struct dm_region_hash {
 };
 
 struct dm_region {
-	struct dm_region_hash *rh;	/* FIXME: can we get rid of this ? */
+	struct dm_region_hash *rh;
 	region_t key;
 	int state;