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
Subsystems (2)
PATCH RESEND 1/1 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
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.
--- drivers/md/dm-region-hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/md/dm-region-hash.c +1 -1
@@ -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;
Signature · 1 line
2.1.0
Alasdair G Kergon
maintainerQuoted 5 lines · Nicholas Krause
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_hashfrom 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
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
Quoted 13 lines · Alasdair G Kergon
Quoted 5 lines · Nicholas Krause
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_hashfrom 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 everydm_regionstruct store its own copy of this pointer?Alasdair
Alasdair G Kergon
maintainerQuoted 2 lines · nick
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
Quoted 9 lines · Alasdair G Kergon
Quoted 2 lines · nick
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
Quoted 5 lines · Nick Krause
Quoted 4 lines · Alasdair G Kergon
Quoted 2 lines · nick
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.
Quoted 7 lines
Quoted 5 lines
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