Re: [PATCH 4/8] e2fsprogs: Next3 snapshot control with chattr/lsattr -X

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 22, 2010 at 11:56 AM, Amir G.
<amir73il@xxxxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, Jun 21, 2010 at 9:17 PM, Andreas Dilger
> <andreas.dilger@xxxxxxxxxx> wrote:
>>> +static struct flags_name snapshot_flags_array[] = {
>>> +     { NEXT3_SNAPFILE_LIST_FL, "S", "on_liSt" },
>>> +     { NEXT3_SNAPFILE_ENABLED_FL, "n", "eNabled" },
>>> +     { NEXT3_SNAPFILE_ACTIVE_FL, "a", "Active" },
>>> +     { NEXT3_SNAPFILE_INUSE_FL, "p", "inuse_by_Previous" },
>>> +     { NEXT3_SNAPFILE_DELETED_FL, "s", "Deleted" },
>>> +     { NEXT3_SNAPFILE_SHRUNK_FL, "h", "sHrunk" },
>>> +     { NEXT3_SNAPFILE_OPEN_FL, "o", "mOunted" },
>>> +     { NEXT3_SNAPFILE_TAGGED_FL, "t", "Tagged" },
>>>       { 0, NULL, NULL }
>>>  };
>>
>> While clever, I don't think this necessarily makes for a good user interface.
>> In comparison, flags "l, e, a, i, d, s, m ,t" respectively make much easier to understand/remember name abbreviations.
>>
>

FYI, I've just resent the snapshot control patch.
The 'leaidsmt' flags where added to Andreas's request.
Those are the default flags when lssnap/chsnap (symlinks to
lsattr/chattr) are invoked.
The 'Snapshot' flags are still supported when lssnap/chsnap -X (or
lsattr/chattr -X) are invoked.

here is the usage of chsnap:
# chsnap
Usage: ./misc/chsnap [-+=let] snapshot files...
Usage: ./misc/chsnap -X [-+=Snt] snapshot files...


>
> As for chattr -X flags, I intend to eliminate those altogether.
> As Ted suggested, controlling the 'n' flag, will no longer be needed,
> once auto-enable is implemented.
> Instead of controlling the 'S' flag for snapshot take/delete, 'take'
> will be invoked automatically on create()
> of file in a snapshots directory and 'delete' will be invoked on
> attempt to unlink() a snapshot file.
>
> See new API design at:
> http://sourceforge.net/apps/mediawiki/next3/index.php?title=User-kernel_API
>

I still didn't get around to implementing the new API,
so for now lssnap/chsnap are still using unused bits in the
GETFLAGS/SETFLAGS ioctl
to control/view snapshot status flags.

Amir.
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Reiser Filesystem Development]     [Ceph FS]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite National Park]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]     [Linux Media]

  Powered by Linux