xemul / mosaic Goto Github PK
View Code? Open in Web Editor NEWMosaic trees managment tool and library
License: Other
Mosaic trees managment tool and library
License: Other
In commit 4bc1e42 there is a call to readlink(). Note that readlink() only works for symbolic links and returns -1 for other types of files (i.e. non-symlinks). Result is:
[root@kir-tpad test-rm-me-ALqR1prS]# ../../moctl/moctl ./plain.mos mount - mmnt
mosaic.c/68:ERROR: Path doesn't look like mosaic config
Error opening mosaic ./plain.mos
I can think of a few ways to fix it, but first I need to understand why you need it in the first place. I don't quite understand the explanation, what I can understand is you want to have some sort of unique ID. The problem is a file name (with the path and the suffix stripped) is not a unique ID. An absolute file name can be. A pair of device + inode can be.
So, back to ways to fix this are:
(filing it for myself so I won't forget)
Mount a mosaic a few times, and you won't be able to unmount it:
# ../../moctl/moctl ./plain.mos mount - plain.dir/
# ../../moctl/moctl ./plain.mos moun - plain.dir/
# ../../moctl/moctl ./plain.mos m - plain.dir/
# ../../moctl/moctl ./plain.mos umount - plain.dir/
Can't umount mosaic: Device or resource busy
A workaround is to use system umount
utility.
I guess the best way to fix it is to use refcounting against mount.
moctl tool with two main types of entities:
1 a mosaic (as a whole);
2 an (individual) volume.
These two types are very different in nature, but the moctl actions we use on them are sometimes intersect. In particular, moctl mount
and moctl umount
can refer to the mosaic or a volume, so we have to introduce a special volume name, -
, meaning "the mosaic itself".
Currently, we have almost 10 volume-related commands, and only 3 mosaic commands (mount
, umount
and info
). To avoid confusion, I propose to prepend the literal word mosaic
for mosaic-related commands, leaving volume-related ones as is.
Example:
moctl NAME mount - MOUNTPOINT
--> moctl NAME mosaic mount MOUNTPOINT
The alternative I considered (and refused) is to use volume
for where the volume name is, such as: moctl NAME mount volume VOLNAME MOUNTPOINT
for volume, and moctl NAME mount MOUNTPOINT
for the mosaic itself.
What do you think?
All the actions with volumes are verbs, but 'new' is an adjective.
I suggest using make
or create
. Create sounds better to me as it's closer to clone, and create
and clone
are the only two possible ways to make a new volume.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.