]> sourceware.org Git - lvm2.git/log
lvm2.git
12 years agoThin creation without activation
Zdenek Kabelac [Sun, 30 Oct 2011 22:07:38 +0000 (22:07 +0000)]
Thin creation without activation

All thins are created with the next activation and VG is updated
without messages. Only some basic commands works.
(i.e. lvcreate -an  -V10 -T mvg/pool)
There can be some combination to confuse this system.

This functionality for snapshots is going to be interesting.

12 years agoThin segment transaction_id moved
Zdenek Kabelac [Sun, 30 Oct 2011 22:04:57 +0000 (22:04 +0000)]
Thin segment transaction_id moved

Add a new node flag send_messages that is used to simplify
test when to call _node_send_messages().

Add call to _node_send_messages when pool is deeper in the tree.

12 years agoCleanup unsuccessfully created thin LV
Zdenek Kabelac [Sun, 30 Oct 2011 22:02:18 +0000 (22:02 +0000)]
Cleanup unsuccessfully created thin LV

If something fails during creation of thin LV remove such LV
and deactivate in case it's been already tried to activate
(i.e. thin kernel driver fails for some reason.)

12 years agoMake detach_pool_message visible for tools
Zdenek Kabelac [Sun, 30 Oct 2011 22:01:39 +0000 (22:01 +0000)]
Make detach_pool_message visible for tools

Move there also vg_write and vg_commit.

12 years agoThin cleanups
Zdenek Kabelac [Sun, 30 Oct 2011 22:00:57 +0000 (22:00 +0000)]
Thin cleanups

Fix/cleanup several error messages.
Remove test for seg_is_thin which could never be true there.
Replace (1<<24) with predefined constant.

12 years agoCleanup for lvmetad passing uninit structure
Zdenek Kabelac [Sun, 30 Oct 2011 21:58:59 +0000 (21:58 +0000)]
Cleanup for lvmetad passing uninit structure

Shown by clang analyzer.

12 years agoImprove valgrind support when compiled with DEBUG_MEM
Zdenek Kabelac [Fri, 28 Oct 2011 20:37:31 +0000 (20:37 +0000)]
Improve valgrind support when compiled with DEBUG_MEM

12 years agoContinue with lvcreate man page update
Zdenek Kabelac [Fri, 28 Oct 2011 20:36:05 +0000 (20:36 +0000)]
Continue with lvcreate man page update

Already in WHATS_NEW.

12 years agoAvoid creation of /dev/vg/thinpool
Zdenek Kabelac [Fri, 28 Oct 2011 20:34:45 +0000 (20:34 +0000)]
Avoid creation of /dev/vg/thinpool

12 years agoThin option documentation
Zdenek Kabelac [Fri, 28 Oct 2011 20:33:50 +0000 (20:33 +0000)]
Thin option documentation

12 years agoThin support for stripe
Zdenek Kabelac [Fri, 28 Oct 2011 20:32:54 +0000 (20:32 +0000)]
Thin support for stripe

Support stripe options to create thin data pool LV.

TODO: combine chunk size and stripe size.

12 years agoThin pool resize support for data LV
Zdenek Kabelac [Fri, 28 Oct 2011 20:31:01 +0000 (20:31 +0000)]
Thin pool resize support for data LV

Support for extension of pool data LV.

TODO: figure out thin volume for suspend/resume in cluster.

12 years agoThin support for lvrename
Zdenek Kabelac [Fri, 28 Oct 2011 20:29:32 +0000 (20:29 +0000)]
Thin support for lvrename

Rename pool's metadata lv _tmeta together with pool and _tdata.

12 years agoThin works only with exclusive activation
Zdenek Kabelac [Fri, 28 Oct 2011 20:29:06 +0000 (20:29 +0000)]
Thin works only with exclusive activation

Enforce exclusive activation with thin targets.

12 years agoThin pool activation change
Zdenek Kabelac [Fri, 28 Oct 2011 20:28:00 +0000 (20:28 +0000)]
Thin pool activation change

To ensure we properly handle LV cluster locking - explicitely do
not allow to change the availability of the thin pool that is in use
for some thin LV.

As soon as the thin volume is created the only way to activate pool
is via implicit dependency.

Ignore thinpool open count for lv/vgchange operations.

12 years agoThin output data_block_size via outsize
Zdenek Kabelac [Fri, 28 Oct 2011 20:25:08 +0000 (20:25 +0000)]
Thin output data_block_size via outsize

Use outsize to get nice size hint.

12 years agoImprove lv_extend stack reporting
Zdenek Kabelac [Fri, 28 Oct 2011 20:23:24 +0000 (20:23 +0000)]
Improve lv_extend stack reporting

and some code cleanup with setting return value.

12 years agoThin error messages clenaup and some indent
Zdenek Kabelac [Fri, 28 Oct 2011 20:19:26 +0000 (20:19 +0000)]
Thin error messages clenaup and some indent

12 years agoRemove thin code from mirror/raid lv_extend
Zdenek Kabelac [Fri, 28 Oct 2011 20:18:32 +0000 (20:18 +0000)]
Remove thin code from mirror/raid lv_extend

12 years agoExtend virtual segment instead of adding new one
Zdenek Kabelac [Fri, 28 Oct 2011 20:17:55 +0000 (20:17 +0000)]
Extend virtual segment instead of adding new one

Before adding a new virtual segment to LV, check first whether
the last segment isn't already of the same type. In this case
extend last segment instead of creating the new one.

Thin volumes should have always only 1 virtual segment, but it
helps also to virtual snapshot or error segtype..

12 years agoAdd last_seg
Zdenek Kabelac [Fri, 28 Oct 2011 20:12:54 +0000 (20:12 +0000)]
Add last_seg

Implement a function to return the last segment in a LV.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
12 years agoTrying to fix the retry logic
Zdenek Kabelac [Fri, 28 Oct 2011 20:11:21 +0000 (20:11 +0000)]
Trying to fix the retry logic

There should be no need for retry for our internal devices - it would be hinding
our own bug in the tree processing.
Update error messages to show also also device name.
No WHATS_NEW - in release fix.

12 years agoFix core on buggy config file
Zdenek Kabelac [Fri, 28 Oct 2011 20:07:38 +0000 (20:07 +0000)]
Fix core on buggy config file

Since fixed within unreleased version so no WHATS_NEW

12 years agoAdd find_config_tree_str_allow_empty
Zdenek Kabelac [Fri, 28 Oct 2011 20:06:49 +0000 (20:06 +0000)]
Add find_config_tree_str_allow_empty

Add function to allow read of empty strings as valid arguments.
Add a warning message if string argument has ignored value.

12 years agoUpdate header comment
Zdenek Kabelac [Fri, 28 Oct 2011 20:04:17 +0000 (20:04 +0000)]
Update header comment

12 years agoUpdate lvconvert man page to describe '--type <segtype>' argument
Jonathan Earl Brassow [Tue, 25 Oct 2011 13:24:23 +0000 (13:24 +0000)]
Update lvconvert man page to describe '--type <segtype>' argument

Man page changes were not included when the ability to convert from
"mirror" -> "raid1" or "linear" -> "raid1" were made.

12 years agoDisallow 'mirrored' log for cluster mirrors.
Jonathan Earl Brassow [Tue, 25 Oct 2011 13:17:04 +0000 (13:17 +0000)]
Disallow 'mirrored' log for cluster mirrors.

Git commit ID 0864378250956c310cb81608978d091fcdcc97d8 was meant to disallow
'mirrored' logs for cluster mirrors.  However, when add_mirror_log is used
to create the log (as is now the case when using 'lvcreate' or converting only
the log) the check is bypassed.

This patch adds the check to add_mirror_log.

12 years agoDon't print char type[8] as a plain string
Zdenek Kabelac [Mon, 24 Oct 2011 10:24:39 +0000 (10:24 +0000)]
Don't print char type[8] as a plain string

pvck prints 'extra' character from the label since there is no '\0'
after the struct label entry and just uint64_t follows directly.
So avoid it by limiting 8 chars to be printed.

https://www.redhat.com/archives/lvm-devel/2011-January/msg00109.html

Signed-off-by: Paul Bolle <pebolle tiscali nl>
12 years agoTest with -F flag
Zdenek Kabelac [Sun, 23 Oct 2011 21:24:27 +0000 (21:24 +0000)]
Test with -F flag

grep need -F to check what we really want to test.
Add better test for existing device.

Currently this test DOES NOT work with real /dev handle via udev
since our tool does not see such device listet through udev.

FIXME: We might be able to see it at least through dmsetup table and
use for lvm.

12 years agoDrop mempool parameter from read functions
Zdenek Kabelac [Sun, 23 Oct 2011 16:05:45 +0000 (16:05 +0000)]
Drop mempool parameter from read functions

Use implicit vgmem pool.

12 years agoAlways use vg memory pool for allocated lv segment
Zdenek Kabelac [Sun, 23 Oct 2011 16:02:01 +0000 (16:02 +0000)]
Always use vg memory pool for allocated lv segment

Remove mem pool parameter from alloc_lv_segment()
Since we should always allocate LV segment from the vg mempool.

12 years agoUsed device name instead of device path
Zdenek Kabelac [Sun, 23 Oct 2011 15:43:10 +0000 (15:43 +0000)]
Used device name instead of device path

Udev is tricky here - since with udev the node does not exists until
it resume happens.  So we need to resume devices via its name.

12 years agoDo not make link in the real /dev
Zdenek Kabelac [Sun, 23 Oct 2011 15:40:15 +0000 (15:40 +0000)]
Do not make link in the real /dev

Skip trying to make link when real /dev dir is used for test.

12 years agoExpect failure with real /dev dir
Zdenek Kabelac [Sun, 23 Oct 2011 15:39:08 +0000 (15:39 +0000)]
Expect failure with real /dev dir

As udev is for now incapable to create such devices
turn this test error into warning.

12 years agoFix usage of DEBUG_ENFORCE_POOL_LOCKING with DEBUG_MEM
Zdenek Kabelac [Sun, 23 Oct 2011 15:38:02 +0000 (15:38 +0000)]
Fix usage of DEBUG_ENFORCE_POOL_LOCKING with DEBUG_MEM

Since DEBUG_MEM is storing own extra structure within returned memory chunk,
glibc free must be used directly for posix_memaling() allocated block.

12 years agoIn t-lvcreate-large, do not create a clustered VG. LV activation/suspend does
Petr Rockai [Sun, 23 Oct 2011 14:30:51 +0000 (14:30 +0000)]
In t-lvcreate-large, do not create a clustered VG. LV activation/suspend does
not work yet with singlenode clvmd in clustered VGs.

12 years agoReduce stack size usage in print_log
Zdenek Kabelac [Sat, 22 Oct 2011 16:52:00 +0000 (16:52 +0000)]
Reduce stack size usage in print_log

As the buf2[] and locn[] can't be used at the same time, safe 1 page from
stack memory.

12 years agoRemove old thin code from _lv_insert_empty_sublvs
Zdenek Kabelac [Sat, 22 Oct 2011 16:48:59 +0000 (16:48 +0000)]
Remove old thin code from _lv_insert_empty_sublvs

Since thin is not able to use _lv_insert_empty_sublvs,
remove its appearence from this function.

Start to use extend_pool() function for desired functionality
and modify lv_extend() for this.

12 years agoEnsure thin LVs take an exclusive activation
Zdenek Kabelac [Sat, 22 Oct 2011 16:47:23 +0000 (16:47 +0000)]
Ensure thin LVs take an exclusive activation

12 years agoRemove extra empty check
Zdenek Kabelac [Sat, 22 Oct 2011 16:46:34 +0000 (16:46 +0000)]
Remove extra empty check

dm_list_splice handles empty list itself, no need to duplicate code.

12 years agoConsistently use metadata LV as the first in MDA
Zdenek Kabelac [Sat, 22 Oct 2011 16:45:25 +0000 (16:45 +0000)]
Consistently use metadata LV as the first in MDA

Cosmetic cleanup.
Mark LV as thin pool before calling attach_pool functions.

12 years agoRecoded way to insert thin pool into vg
Zdenek Kabelac [Sat, 22 Oct 2011 16:44:23 +0000 (16:44 +0000)]
Recoded way to insert thin pool into vg

Code in _lv_insert_empty_sublvs  was not able to provide proper
initialization order for thin pool LV.

New function extend_pool() first adds metadata segment to pool LV which
is still visible. Such LV is activate and cleared.

Then new meta LV is created and metadata segments are moved there.
Now the preallocated pool data segment is attached to the pool LV
and layer _tpool is created. Finaly segment is marked as thin_pool.

12 years agoMake move_lv_segment non-static
Zdenek Kabelac [Sat, 22 Oct 2011 16:42:10 +0000 (16:42 +0000)]
Make move_lv_segment non-static

This function could be useful for other _manip source files.

Use dm_list manipulation function for provided functionality,
which make the code more readable and avoid touching list
internal details here.

12 years agoPass exclusive LV locks to all nodes in the cluster.
Alasdair Kergon [Fri, 21 Oct 2011 15:49:45 +0000 (15:49 +0000)]
Pass exclusive LV locks to all nodes in the cluster.
This was the intended behaviour, as described in the lvchange man page, so you
have complete control through volume_list in lvm.conf, but the code seems to
have been treating -ae as local-only for a very long time.

12 years agoStore transaction_id with created thin lv
Zdenek Kabelac [Fri, 21 Oct 2011 11:38:35 +0000 (11:38 +0000)]
Store transaction_id with created thin lv

So we know the creation history and this should be useful with vgcfgrestore.

12 years agoRemove double-hack for setting metadata size
Zdenek Kabelac [Fri, 21 Oct 2011 09:55:50 +0000 (09:55 +0000)]
Remove double-hack for setting metadata size

Drop the second lv_extend and set 128MB directly in the first hack place.

12 years agoThin pool now support chunk size as well
Zdenek Kabelac [Fri, 21 Oct 2011 09:55:07 +0000 (09:55 +0000)]
Thin pool now support chunk size as well

Use chunksize option to specify data_block_size for thin pool target.
Drop low_water_mark to zero.

12 years agoMake units for chunksize more obvious
Zdenek Kabelac [Fri, 21 Oct 2011 09:53:16 +0000 (09:53 +0000)]
Make units for chunksize more obvious

12 years agoAling structure chunk on default aling size
Zdenek Kabelac [Thu, 20 Oct 2011 14:43:33 +0000 (14:43 +0000)]
Aling structure chunk on default aling size

Since we use 8 bytes by default for the pool allocation,
keep the structure aligned with this size.
(Somehow it was not applied in previous commit.)

12 years agoMark chunk memory for free as defined again for valgrind
Zdenek Kabelac [Thu, 20 Oct 2011 13:39:57 +0000 (13:39 +0000)]
Mark chunk memory for free as defined again for valgrind

When DEBUG_MEM is used, the memory is trashed with extra pattern before real
free() is called, and as this memory was marked as non accessible when used with
valgrind, make it again usable.

12 years agoAling structure chunk on default aling size
Zdenek Kabelac [Thu, 20 Oct 2011 13:36:13 +0000 (13:36 +0000)]
Aling structure chunk on default aling size

Since we use 8 bytes by default for the pool allocation,
keep the structure aligned with this size.

12 years agoSimplify some pointer operations
Zdenek Kabelac [Thu, 20 Oct 2011 13:33:41 +0000 (13:33 +0000)]
Simplify some pointer operations

12 years agoRemove unused file from tree
Zdenek Kabelac [Thu, 20 Oct 2011 13:23:52 +0000 (13:23 +0000)]
Remove unused file from tree

12 years agoJust replace stack, return 0 with return_0
Zdenek Kabelac [Thu, 20 Oct 2011 10:39:07 +0000 (10:39 +0000)]
Just replace stack, return 0  with  return_0

12 years agoCleanup backtraces
Zdenek Kabelac [Thu, 20 Oct 2011 10:38:04 +0000 (10:38 +0000)]
Cleanup backtraces

Make sure stacks are at the right places when something goes wrong here.

12 years agoAdd last param 0 for thin-pool
Zdenek Kabelac [Thu, 20 Oct 2011 10:35:55 +0000 (10:35 +0000)]
Add last param 0 for thin-pool

So now the table suppression works for thin-pool.

12 years agoEnsure right activation order
Zdenek Kabelac [Thu, 20 Oct 2011 10:35:14 +0000 (10:35 +0000)]
Ensure right activation order

Couple FIXMEs put into the code for parts of the code which may be
improved later, since we might be able to add 'lazy' device creation later.
For now require exclusive activation.

12 years agoAdapt to thin kernel target API
Zdenek Kabelac [Thu, 20 Oct 2011 10:33:30 +0000 (10:33 +0000)]
Adapt to thin kernel target API

Since kernel target uses low_water_mark - use this name in libdm as well.

12 years agoReindent code
Zdenek Kabelac [Thu, 20 Oct 2011 10:32:29 +0000 (10:32 +0000)]
Reindent code

Avoid 1 indent level and use check for empty list only for
add of transaction_id message.

12 years agoUse const pointers in thin API were appropriate
Zdenek Kabelac [Thu, 20 Oct 2011 10:31:27 +0000 (10:31 +0000)]
Use const pointers in thin API were appropriate

12 years agoPrint low_water_mark only when it has some value
Zdenek Kabelac [Thu, 20 Oct 2011 10:30:39 +0000 (10:30 +0000)]
Print low_water_mark only when it has some value

Do not expose low_water_mark in mda yet, if it has no use.
We do not allow to be set via current lvm tool code.
Usage needs to be clarified first.

12 years agoAdd _BLOCK_ to define
Zdenek Kabelac [Thu, 20 Oct 2011 10:28:41 +0000 (10:28 +0000)]
Add _BLOCK_ to define

Use DM_THIN_MIN_DATA_BLOCK_SIZE and
DM_THIN_MAX_DATA_BLOCK_SIZE to make it more obvious, for which
this define is useful in thin API.

12 years agoImprove lvcreate man page
Zdenek Kabelac [Wed, 19 Oct 2011 16:49:13 +0000 (16:49 +0000)]
Improve lvcreate man page

Split syntax for thin-pool since it cannot be fully matched with snapshot.
So to avoid more confusion - take thin support into separate line.

Though still significant updates are needed for thin provisioning.

12 years agoAdd few more protected names
Zdenek Kabelac [Wed, 19 Oct 2011 16:45:35 +0000 (16:45 +0000)]
Add few more protected names

12 years agoUse structure copy
Zdenek Kabelac [Wed, 19 Oct 2011 16:45:02 +0000 (16:45 +0000)]
Use structure copy

Since the code evolved a bit with current structures we could use C to
copy struct members.

12 years agoUpdate error message
Zdenek Kabelac [Wed, 19 Oct 2011 16:42:14 +0000 (16:42 +0000)]
Update error message

Drop INTERNAL_ERROR from public API functions.
Improve some messages.

12 years agoUse generic name for message sending function
Zdenek Kabelac [Wed, 19 Oct 2011 16:40:59 +0000 (16:40 +0000)]
Use generic name for message sending function

Drop _thin_pool prefix for _node_send_message so it could be extended later.
Replace current_id with trans_id name.

12 years agoSimple validation of messages in mda
Zdenek Kabelac [Wed, 19 Oct 2011 16:39:09 +0000 (16:39 +0000)]
Simple validation of messages in mda

Check we do not combine multiple messages for same LV target
and switch to use  'delete_id' to make it clear for what this device_id
is being used.

12 years agoDrop messages referencing deleted LV
Zdenek Kabelac [Wed, 19 Oct 2011 16:37:30 +0000 (16:37 +0000)]
Drop messages referencing deleted LV

lvremove may remove problematic LV for thin target.

12 years agoJust indent changes
Zdenek Kabelac [Wed, 19 Oct 2011 16:36:39 +0000 (16:36 +0000)]
Just indent changes

Some tabs & spaces.

12 years agoAdd internal expected_errno dm_tast var
Zdenek Kabelac [Wed, 19 Oct 2011 16:36:01 +0000 (16:36 +0000)]
Add internal expected_errno dm_tast var

Certain errno codes could be expected in some situations thus
add experimental support for them.

When expected errno is set after ioctl error - function skips error
printing and exits succefully.

Currently only useful for thin pool messages.

12 years agoRemove test for thin_pool
Zdenek Kabelac [Wed, 19 Oct 2011 16:32:34 +0000 (16:32 +0000)]
Remove test for thin_pool

Since both functions are called during mda read - we don't have full LV info
at this moment.

12 years agoRemove a redundant (and in some cases, misleading) message about snapshot
Petr Rockai [Wed, 19 Oct 2011 14:31:49 +0000 (14:31 +0000)]
Remove a redundant (and in some cases, misleading) message about snapshot
extension, in the snapshot dmeventd plugin. The reporting is done as needed by
the LVM command nowadays.

12 years agoNew.
Petr Rockai [Wed, 19 Oct 2011 09:01:03 +0000 (09:01 +0000)]
New.

12 years agoKeep the LVM-based dmeventd plugins from trying to manipulate the dmeventd
Petr Rockai [Wed, 19 Oct 2011 08:46:26 +0000 (08:46 +0000)]
Keep the LVM-based dmeventd plugins from trying to manipulate the dmeventd
monitoring state of the logical volumes they are currently acting on.

Until now, every time a logical volume has been changed by a dmeventd plugin,
this plugin would have called back to dmeventd through the external FIFO
mechanism. I am fairly sure this was superfluous, inefficient and possibly even
dangerous.

12 years agoFix bad lvconvert help output.
Jonathan Earl Brassow [Tue, 18 Oct 2011 16:27:45 +0000 (16:27 +0000)]
Fix bad lvconvert help output.

The '--merge' option to lvconvert works on snapshots and RAID1.  The man
pages correctly reflect this, but the CLI help output still used the term,
'SnapshotLogicalVolume'.

12 years agoUse zalloc for malloc,memset
Zdenek Kabelac [Mon, 17 Oct 2011 14:36:06 +0000 (14:36 +0000)]
Use zalloc for malloc,memset

12 years agoDrop messages from lvm app context
Zdenek Kabelac [Mon, 17 Oct 2011 14:18:07 +0000 (14:18 +0000)]
Drop messages from lvm app context

(revert)
Thinp target uses activation context.

12 years agoIndent debug message
Zdenek Kabelac [Mon, 17 Oct 2011 14:17:30 +0000 (14:17 +0000)]
Indent debug message

12 years agoMessage support for thin provisiong
Zdenek Kabelac [Mon, 17 Oct 2011 14:17:09 +0000 (14:17 +0000)]
Message support for thin provisiong

lvm part of messaging.

Each message is now stored it's own thin pool section:

message1 {
create = lv
}

Messages are queued to thin pool dm target when this target
is going to be resumed or used through some dependency.

Currently  'delete' message are purely queued and processed
with next thin pool resume operation (i.e. create_thin).

WARNING - thin provisioning support is developmental code.

12 years agoAdd thin_pool dm message support
Zdenek Kabelac [Mon, 17 Oct 2011 14:16:25 +0000 (14:16 +0000)]
Add thin_pool dm message support

Experimental support for kernel message via resume sequence.

12 years agoAdd _thin_validate_device_id
Zdenek Kabelac [Mon, 17 Oct 2011 14:15:26 +0000 (14:15 +0000)]
Add _thin_validate_device_id

12 years agoSwap parameters
Zdenek Kabelac [Mon, 17 Oct 2011 14:15:01 +0000 (14:15 +0000)]
Swap parameters

Use metadata uuid first (match kernel target).

12 years agoDrop old check for transaction_id
Zdenek Kabelac [Mon, 17 Oct 2011 14:14:33 +0000 (14:14 +0000)]
Drop old check for transaction_id

(revert)

12 years agoFix alignment warning in bitcount calculation for raid segment.
Milan Broz [Mon, 17 Oct 2011 13:15:35 +0000 (13:15 +0000)]
Fix alignment warning in bitcount calculation for raid segment.

12 years agoUse a more correct macro for 'seg_is_linear'
Jonathan Earl Brassow [Fri, 14 Oct 2011 14:21:32 +0000 (14:21 +0000)]
Use a more correct macro for 'seg_is_linear'

It is better to check 'seg->area_count == 1' than '!seg->stripe_size'.

12 years agocmirrord now returns log name to kernel in CTR so it can be registered
Jonathan Earl Brassow [Fri, 14 Oct 2011 14:18:49 +0000 (14:18 +0000)]
cmirrord now returns log name to kernel in CTR so it can be registered

Version 2 of the userspace log protocol accepts return information during the
DM_ULOG_CTR exchange.  The return information contains the name of the log
device that is being used (if there is one).  The kernel can then register the
device via 'dm_get_device'.  Amoung other things, this allows for userspace to
assemble a correct dependency tree of devices - critical for LVM handling of
suspend/resume calls.

Also, update dm-log-userspace.h to match the kernel header associated with
this protocol change.  (Includes a version inc.)

12 years agoUpdate stale libdm/misc/dm-log-userspace.h
Jonathan Earl Brassow [Fri, 14 Oct 2011 14:04:05 +0000 (14:04 +0000)]
Update stale libdm/misc/dm-log-userspace.h

The upstream kernel version that this file mirrors has changed, here is the
commit message:

commit 86a54a4802df10d23ccd655e2083e812fe990243
Author: Jonathan Brassow <jbrassow@redhat.com>
Date:   Thu Jan 13 19:59:52 2011 +0000

    dm log userspace: add version number to comms

    This patch adds a 'version' field to the 'dm_ulog_request'
    structure.

    The 'version' field is taken from a portion of the unused
    'padding' field in the 'dm_ulog_request' structure.  This
    was done to avoid changing the size of the structure and
    possibly disrupting backwards compatibility.

    The version number will help notify user-space daemons
    when a change has been made to the kernel/userspace
    log API.

Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
12 years agoUse pool for dm_tree allocation
Zdenek Kabelac [Fri, 14 Oct 2011 13:34:19 +0000 (13:34 +0000)]
Use pool for dm_tree allocation

Using the same pool allocation strategy as we use for vg,
so dm_tree structure is part of the pool itself.

12 years agoFix lv_info open_count test
Zdenek Kabelac [Fri, 14 Oct 2011 13:23:47 +0000 (13:23 +0000)]
Fix lv_info open_count test

When verify_udev_operations was disable, code for stacking fs operation for
lvm links was completely disable - but this code was also used for collecting
information, that a new node is being created.

Add a new flag which is set when a creation of lv symlinks is requested which
should restore old behaviour of lv_info function, that has called fs_sync()
before quere for open count on device.

12 years agoRemove unused variables
Zdenek Kabelac [Tue, 11 Oct 2011 10:06:57 +0000 (10:06 +0000)]
Remove unused variables

12 years agoUse constant for the repeated dlid size specification
Zdenek Kabelac [Tue, 11 Oct 2011 10:02:28 +0000 (10:02 +0000)]
Use constant for the repeated dlid size specification

12 years agoAdd some fixme locking
Zdenek Kabelac [Tue, 11 Oct 2011 09:56:44 +0000 (09:56 +0000)]
Add some fixme locking

Code here is using thread write protected variable without locking.
So add locking, for proper synchronization and a FIXME, since the
code needs closer look.

12 years agoSimplify worker loop
Zdenek Kabelac [Tue, 11 Oct 2011 09:54:39 +0000 (09:54 +0000)]
Simplify worker loop

Do not reacquire mutex several times without a real reason.
Code readability is also better.

12 years agoUse barrier instead of mutex
Zdenek Kabelac [Tue, 11 Oct 2011 09:26:04 +0000 (09:26 +0000)]
Use barrier instead of mutex

Barrier is supposed to be used in situation like this
and replace tricky mutex usage, where mutex has been unlocked
by a different thread than the locking thread.

12 years agoAdd FIXMEs for init_test
Zdenek Kabelac [Tue, 11 Oct 2011 09:23:48 +0000 (09:23 +0000)]
Add FIXMEs for init_test

Usage of thread unprotected init_test is not correct and needs probably lvm lock
since it part of lvm library. Current implementation may probably fail with
test mode and actually create something unexpectedly (and vice versa).

12 years agoUpdate
Zdenek Kabelac [Tue, 11 Oct 2011 09:20:17 +0000 (09:20 +0000)]
Update

12 years agoLimit thread stack
Zdenek Kabelac [Tue, 11 Oct 2011 09:18:49 +0000 (09:18 +0000)]
Limit thread stack

Since default thread stack size is around 8MB and clvmd creates for now thread
for message, clvmd may easily reach multi GB size of in-memory locked pages
(runs with mlockall()).

This patch significantly reduces memory usage to just tens of MB,
and now different reasons are the cause of server overloading.
Now we are running out of free file descriptors mostly.

12 years agoUpdate whats new
Zdenek Kabelac [Tue, 11 Oct 2011 09:14:51 +0000 (09:14 +0000)]
Update whats new

12 years agoReduce preallocated stack size
Zdenek Kabelac [Tue, 11 Oct 2011 09:13:39 +0000 (09:13 +0000)]
Reduce preallocated stack size

Go with just 64KiB for stack.

Closer inspection should be made, whether we actually need to play with
settings at all.

Since default stack size is 8MB and gets mapped via page locking thus,
it seems there is no big help with preallocation of stack to some value.

This page took 0.065571 seconds and 5 git commands to generate.