FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Device-mapper Development

 
 
LinkBack Thread Tools
 
Old 04-06-2010, 06:26 AM
Mikulas Patocka
 
Default some shared snapshot readability improvements

Hi

Is it needed to just rename variables?

It doesn't add readability, the new variable names are no more readable
than the old ones --- chaning "s" and "p" to "ps" and "dm" to "s" doesn't
seem to make anything but confusion.

Mikulas

On Fri, 2 Apr 2010, Mike Snitzer wrote:

> Quite a lot of churn but I think it is for the better in the end.
>
> (I developed these changes on Wednesday but just got around to getting
> them sent out now)
>
> Mike Snitzer (7):
> document low hanging fruit to help improve code readability
> Improve name used for "persistent store" in 'struct dm_multisnap'
> Avoid exception store being confused with snapshot 's'
> Avoid struct members with the name 'dm'
> rename snapid members to use 'snapid' names
> move individual dm_multisnap 'flags' values
> Removed remaining 'struct dm_exception_store' FIXMEs.
>
> drivers/md/dm-multisnap-alloc.c | 271 +++++++++---------
> drivers/md/dm-multisnap-blocks.c | 118 ++++----
> drivers/md/dm-multisnap-btree.c | 330 +++++++++++-----------
> drivers/md/dm-multisnap-commit.c | 140 +++++-----
> drivers/md/dm-multisnap-daniel.c | 32 +-
> drivers/md/dm-multisnap-delete.c | 70 +++---
> drivers/md/dm-multisnap-freelist.c | 96 ++++----
> drivers/md/dm-multisnap-io.c | 148 +++++-----
> drivers/md/dm-multisnap-mikulas-struct.h | 8 +-
> drivers/md/dm-multisnap-mikulas.c | 441 +++++++++++++++---------------
> drivers/md/dm-multisnap-mikulas.h | 110 ++++----
> drivers/md/dm-multisnap-private.h | 8 +-
> drivers/md/dm-multisnap-snaps.c | 234 ++++++++--------
> drivers/md/dm-multisnap.c | 72 +++---
> drivers/md/dm-multisnap.h | 38 ++--
> 15 files changed, 1060 insertions(+), 1056 deletions(-)
>

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
 
Old 04-06-2010, 06:15 PM
Mike Snitzer
 
Default some shared snapshot readability improvements

Hi,

Using 's' for something other than snapshot is confusing. 'ps' is
better than 'p' as it builds on other snapshot code that established
the use of 'ps' for a persistent store. And using 'dm' for
dm_multisnap is just awkward.

Figured it best to make all variables consistent across the codebase.
If there were accessor functions these renames wouldn't be so
wide-spread but I can easily see why accessors weren't ever
introduced.

I believe the new names and consistency to be better. If you think
it's a problem to make these edits then feel free to ignore them.

Mike

On Mon, Apr 5, 2010 at 8:26 PM, Mikulas Patocka <mpatocka@redhat.com> wrote:
> Hi
>
> Is it needed to just rename variables?
>
> It doesn't add readability, the new variable names are no more readable
> than the old ones --- chaning "s" and "p" to "ps" and "dm" to "s" doesn't
> seem to make anything but confusion.
>
> Mikulas
>
> On Fri, 2 Apr 2010, Mike Snitzer wrote:
>
>> Quite a lot of churn but I think it is for the better in the end.
>>
>> (I developed these changes on Wednesday but just got around to getting
>> them sent out now)
>>
>> Mike Snitzer (7):
>> * document low hanging fruit to help improve code readability
>> * Improve name used for "persistent store" in 'struct dm_multisnap'
>> * Avoid exception store being confused with snapshot 's'
>> * Avoid struct members with the name 'dm'
>> * rename snapid members to use 'snapid' names
>> * move individual dm_multisnap 'flags' values
>> * Removed remaining 'struct dm_exception_store' FIXMEs.
>>
>> *drivers/md/dm-multisnap-alloc.c * * * * *| *271 +++++++++---------
>> *drivers/md/dm-multisnap-blocks.c * * * * | *118 ++++----
>> *drivers/md/dm-multisnap-btree.c * * * * *| *330 +++++++++++-----------
>> *drivers/md/dm-multisnap-commit.c * * * * | *140 +++++-----
>> *drivers/md/dm-multisnap-daniel.c * * * * | * 32 +-
>> *drivers/md/dm-multisnap-delete.c * * * * | * 70 +++---
>> *drivers/md/dm-multisnap-freelist.c * * * | * 96 ++++----
>> *drivers/md/dm-multisnap-io.c * * * * * * | *148 +++++-----
>> *drivers/md/dm-multisnap-mikulas-struct.h | * *8 +-
>> *drivers/md/dm-multisnap-mikulas.c * * * *| *441 +++++++++++++++---------------
>> *drivers/md/dm-multisnap-mikulas.h * * * *| *110 ++++----
>> *drivers/md/dm-multisnap-private.h * * * *| * *8 +-
>> *drivers/md/dm-multisnap-snaps.c * * * * *| *234 ++++++++--------
>> *drivers/md/dm-multisnap.c * * * * * * * *| * 72 +++---
>> *drivers/md/dm-multisnap.h * * * * * * * *| * 38 ++--
>> *15 files changed, 1060 insertions(+), 1056 deletions(-)
>>
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
>

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

Thread Tools




All times are GMT. The time now is 12:18 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org