1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00
Commit Graph

7479 Commits

Author SHA1 Message Date
Joe Thornber
b27957a686 o Trivial binary tree 2001-10-25 11:38:19 +00:00
Joe Thornber
890b537974 o added aliases list to struct device. 2001-10-25 11:34:55 +00:00
Joe Thornber
e1e529fae1 o Merged common code between hash_destroy and hash_wipe. 2001-10-25 08:31:43 +00:00
Alasdair Kergon
d2393d23ee persistent cache fully incorporated. Goodbye to scanning /dev/cdrom :-) 2001-10-24 17:53:50 +00:00
Alasdair Kergon
4790fce2ad persistent filter & some log message changes 2001-10-23 18:20:27 +00:00
Joe Thornber
68c14b47aa o removed old files 2001-10-23 14:17:07 +00:00
Joe Thornber
9d3bf3e2c1 o forgot to use the path passed into _read_array. 2001-10-23 13:12:05 +00:00
Alasdair Kergon
014a5c0bf0 deallocations 2001-10-23 12:33:57 +00:00
Joe Thornber
10a6939753 o rethink of the persistent filter 2001-10-23 12:24:55 +00:00
Alasdair Kergon
20a2b71c9c filter integration into tools 2001-10-23 11:50:49 +00:00
Joe Thornber
7e38924de5 o forgot to retry on EINTR or EAGAIN, doh ! 2001-10-23 11:16:30 +00:00
Joe Thornber
63408276f9 o forgot 'static' 2001-10-22 14:40:31 +00:00
Joe Thornber
12eabe3031 o composite filter that allows us to merge filters. Think of it as &&'ing
filters in order.

eg,

	f = composite_filter_create(2, regex_filter, persistent_filter);

  ownership of the filters passes, they will be destroyed when f's
  destroy method is called.
2001-10-22 14:39:12 +00:00
Joe Thornber
5f16718b19 o Filter which caches valid devices in a file. Pass in init == 1 to the
constructor if you want it to ignore the existing cache and check every
  device again (eg, vgscan, pvscan).
2001-10-22 14:14:00 +00:00
Alasdair Kergon
c4151d1aa4 reinstate a removed line 2001-10-22 13:44:09 +00:00
Joe Thornber
98af757b00 o tidying 2001-10-21 10:24:10 +00:00
Joe Thornber
291ec3b6c0 o Filter for the dev cache that takes values from config file:
devices {

        # first match is final, eg.  /dev/ide/cdrom
		        # get's rejected due to the first pattern

					filter=["r/cdrom/",         # don't touch the music !
							"a/hd[a-d][0-9]+/",
							"a/ide/",
							"a/sd/",
							"a/md/",
							"a|loop/[0-9]+|", # accept devfs style loop back
							"r/loop/",        # and reject old style
							"a/dasd/",
							"a/dac960/",
							"a/nbd/",
							"a/ida/",
							"a/cciss/",
							"a/ubd/",
							"r/.*/"] # reject all others
}


Alasdair this is ready to roll into the tools now.
2001-10-19 18:20:37 +00:00
Joe Thornber
d1b28647ed o First pass at the regex code. lib/regex/matcher takes an array of regex's
and builds a *very* efficient engine that will tell you which regex a string
  matches with only a single pass through the string.  To be used in the config
  file when specifying devices.

o Anchor's aren't supported yet (^ and $) but that won't take long.

o Also when we get some realistic config files we may want to consider adding an
  extra level of indirection to the dfa state in order to compress the table.
  It all depends on how large typical tables get.
2001-10-19 14:36:57 +00:00
Alasdair Kergon
cd77c5a7b7 pvdisplay 2001-10-18 16:55:19 +00:00
Alasdair Kergon
8f8a968dc2 pvchange 2001-10-17 15:29:31 +00:00
Alasdair Kergon
a381c45a6e vgchange 2001-10-16 16:25:28 +00:00
Alasdair Kergon
ffb3162116 vgextend 2001-10-15 22:04:27 +00:00
Alasdair Kergon
aa290eb285 vgcreate basic extent size validation 2001-10-15 20:29:15 +00:00
Alasdair Kergon
df2e0dc751 More vgcreate error trapping 2001-10-15 18:39:40 +00:00
Alasdair Kergon
ca8f8837c2 o lvm readline error-case tidy-up
o more vgcreate error cases
2001-10-15 12:49:58 +00:00
Joe Thornber
8a482590fa o vgcreate 2001-10-12 14:25:53 +00:00
Alasdair Kergon
9711fef759 vgcreate 2001-10-12 12:21:43 +00:00
Joe Thornber
2cb6249206 o make ios the first argument to pv_create 2001-10-12 10:52:32 +00:00
Joe Thornber
72a5e12b5c o pvcreate
o added uuid unit

o stubbed partition stuff
2001-10-12 10:32:06 +00:00
Alasdair Kergon
6e91eeef13 vgreduce, vgremove, vgrename & vgscan 2001-10-11 21:35:55 +00:00
Joe Thornber
7f64636f5f o try incrementing pv_number from 1 2001-10-11 16:31:09 +00:00
Joe Thornber
1eabbe1ad7 o if contained &= instad of & 2001-10-11 15:09:31 +00:00
Joe Thornber
e8220912e9 o initalise list_heads, initialise list_heads, initi .. 2001-10-11 14:21:38 +00:00
Joe Thornber
6b6a344e09 o a very quick hack to get vg_number right 2001-10-11 14:10:18 +00:00
Joe Thornber
383d1752fa o set PV_ALLOCATABLE flag correctly 2001-10-11 13:34:17 +00:00
Joe Thornber
68cb51e7dd o pv->system_id 2001-10-11 13:22:51 +00:00
Joe Thornber
ece1fe835c o vg->pv_act 2001-10-11 13:05:55 +00:00
Joe Thornber
ab47fb661f o calculate pv_numbers and lv_numbers for LVM1 support 2001-10-11 10:55:19 +00:00
Joe Thornber
491ae26f6c o pe_start wasn't being set properly when exporting to disk
o added a check for lv's with null lv_name

o setup pv->lv_cur correctly

o test program for vg_write
2001-10-11 10:08:44 +00:00
Joe Thornber
dcca4d2081 o sync 2001-10-10 17:11:31 +00:00
Alasdair Kergon
2d9133bbbd standardise some log messages 2001-10-10 16:36:32 +00:00
Joe Thornber
758b8b4ba0 o builds a very sub-optimal table 2001-10-10 15:30:31 +00:00
Joe Thornber
aed3f57b3b o allocate and zero the extents before exporting the lv's 2001-10-10 14:56:53 +00:00
Joe Thornber
398c218b03 o zero all of uuid 2001-10-10 13:33:20 +00:00
Joe Thornber
023c303501 o uuid_list->id should be NAME_LEN wide 2001-10-10 13:30:58 +00:00
Joe Thornber
7ca11f8f96 o sizeof(NAME_LEN), don't do that 2001-10-10 13:24:16 +00:00
Joe Thornber
e3de4ba830 o forgot to init a list head 2001-10-10 13:09:40 +00:00
Joe Thornber
0db56c6b55 o dev_write 2001-10-10 13:03:10 +00:00
Alasdair Kergon
90ae9fe928 Tidy metadata diagnostic messages. 2001-10-10 12:45:20 +00:00
Joe Thornber
214e32c96e o return data not 1 in read_ov 2001-10-10 12:42:03 +00:00
Joe Thornber
4d468cffcd o check for orphaned pv's when reading 2001-10-10 12:28:10 +00:00
Joe Thornber
88835ab641 o pv_setup for format1, this is the last one ! 2001-10-10 10:55:55 +00:00
Joe Thornber
de9acc04f6 o pv_write for orphan pv's 2001-10-10 10:05:29 +00:00
Joe Thornber
6320fd9e52 o add munging for format1 and 2 2001-10-10 09:36:29 +00:00
Joe Thornber
755590409e o Code to calculate the metadata layout. 2001-10-10 09:25:04 +00:00
Joe Thornber
11d9c9f2a5 o stub pv_write to stop tools crashing 2001-10-09 17:44:58 +00:00
Joe Thornber
39b3b91755 o fix seg fault while reading extents 2001-10-09 17:36:48 +00:00
Joe Thornber
a82ba3827c o remove another spurious error message 2001-10-09 17:30:20 +00:00
Alasdair Kergon
0dc2a4d6e4 o vgremove.
o filter devices by major.
2001-10-09 17:20:02 +00:00
Joe Thornber
e15559aa3c o spot empty list in build_vg 2001-10-09 17:09:46 +00:00
Joe Thornber
5cffeebbaa o proposed interface to the kernel driver 2001-10-09 16:44:30 +00:00
Joe Thornber
bb29623852 o dev-mgr disappears 2001-10-09 16:13:12 +00:00
Joe Thornber
b1713d284d o change pv_read to take a name rather than a device 2001-10-09 16:05:34 +00:00
Joe Thornber
f2473d0efe o remove spurious log message 2001-10-09 14:42:58 +00:00
Joe Thornber
83545752cf o hack, hack, hack 2001-10-09 14:26:45 +00:00
Joe Thornber
87e8aeca40 o vg_write compiles 2001-10-09 10:47:52 +00:00
Joe Thornber
7a8c751a8f o get_vgs works 2001-10-09 09:22:50 +00:00
Joe Thornber
47bd29840d o pv_Read works 2001-10-09 08:58:52 +00:00
Joe Thornber
4c9c080e07 o get_pvs now works for format 1 2001-10-09 08:11:52 +00:00
Alasdair Kergon
677a06d5fd vgrename & vgck 2001-10-08 18:44:22 +00:00
Joe Thornber
c8ca2a2993 o get_pvs for format 1
o fix vg_read if vg doesn't exist
2001-10-08 17:53:43 +00:00
Joe Thornber
67905e0d59 o added pretty printing to read_vg_t, run this on your system
to see what vg's you've got

S: ----------------------------------------------------------------------
2001-10-08 17:28:49 +00:00
Joe Thornber
f5f8443131 o read_vg works (or so it claims) 2001-10-08 16:08:16 +00:00
Joe Thornber
43b7b8cf69 o dev_cache_t program works 2001-10-08 13:58:52 +00:00
Joe Thornber
721128e86d o sync 2001-10-08 12:11:33 +00:00
Joe Thornber
a25004545e o we were stuill building dev-mgr files 2001-10-08 10:35:59 +00:00
Joe Thornber
9761650d1f o read_vg_t compiles 2001-10-08 10:20:25 +00:00
Joe Thornber
812efa0f48 o get things compiling 2001-10-08 09:45:16 +00:00
Joe Thornber
d81ec60d19 o test program for reading a vg 2001-10-08 08:47:27 +00:00
Alasdair Kergon
25d42d50a8 Sync include file changes. 2001-10-05 21:39:30 +00:00
Joe Thornber
df765ac1c8 o end of day sync 2001-10-05 16:36:53 +00:00
Joe Thornber
06985de900 o replace {stack; return 0;}'s with a macro (just for this file). 2001-10-05 15:48:05 +00:00
Joe Thornber
9d3f8b7144 o low level write path 2001-10-05 15:20:40 +00:00
Joe Thornber
064c620fb0 o finished writing extent reading code 2001-10-05 13:59:44 +00:00
Alasdair Kergon
f09fdc28fa revised flags and comments 2001-10-05 13:03:03 +00:00
Alasdair Kergon
ee1f91bf27 metadata status flags regrouping & comments; misc tool changes 2001-10-04 22:53:37 +00:00
Joe Thornber
3840b20ac9 o vg_read for format1 2001-10-04 17:48:55 +00:00
Joe Thornber
a74c0f91ef o define the uintN_t types 2001-10-04 11:40:13 +00:00
Joe Thornber
e6efb2b0bd o got dbg_malloc_t working, Alasdair could you look at the Makefile.in it
seems to be having trouble with the dependencies.

o removed some files from the lib makefile that don't compile yet.
2001-10-04 10:13:07 +00:00
Joe Thornber
5bdbd4b380 o Use the __alignof__ extension to set DEFAULT_ALIGNMENT to that required
for a 'double'.
2001-10-04 09:10:11 +00:00
Alasdair Kergon
b39630bdb7 vgcreate & lvmchange outlines 2001-10-03 20:38:07 +00:00
Alasdair Kergon
317919c7c6 vgrename & pvchange outlines 2001-10-03 17:03:25 +00:00
Joe Thornber
150df6632d o added dev-cache.c, dev-io and sorted source files alphabetically 2001-10-03 12:46:17 +00:00
Joe Thornber
8696e06602 o I've moved the dev-cache and dev-io into here since this directory has a
better name.  dev-mgr will be removed at some point.
2001-10-03 12:41:29 +00:00
Alasdair Kergon
fbad1c90a1 lvremove outline 2001-10-03 12:34:08 +00:00
Joe Thornber
b8e4e502d3 o code sync for dev-cache.c
o made copyright headers the same

o added __attribute ((format ... to print_log so we'll get better compile errors

o added iterator to the hash table
2001-10-03 11:06:31 +00:00
Alasdair Kergon
9e300c8427 pvscan framework 2001-10-02 17:09:05 +00:00
Alasdair Kergon
1f6db21f32 Another step towards consistency & compilation. 2001-10-01 22:12:10 +00:00
Alasdair Kergon
28f5d16b4f Misc structural changes. 2001-10-01 19:36:06 +00:00
Alasdair Kergon
552c2479aa Misc structural changes. 2001-10-01 19:29:52 +00:00
Joe Thornber
74a54dc297 o changed dev-manager to a dev_filter 2001-10-01 16:21:21 +00:00
Joe Thornber
2f15b18f93 o get block size moved to dev-io.c 2001-10-01 16:07:29 +00:00
Alasdair Kergon
58f5fa84f3 merge partition code 2001-10-01 15:59:40 +00:00
Joe Thornber
91933eb69b o drop the reference counting in the devices. 2001-10-01 15:43:51 +00:00
Joe Thornber
9263388a70 o missing * 2001-10-01 15:28:28 +00:00
Joe Thornber
a5072db62a o added filter type. 2001-10-01 15:27:16 +00:00
Alasdair Kergon
b8ef655fb7 Tidy include files 2001-10-01 15:14:39 +00:00
Joe Thornber
d41d4056ca o I'm splitting dev-manager in two. dev-cache is the bottom layer that
handles devices.  Dev-manager will sit on this filtering the view.
2001-09-28 15:42:25 +00:00
Joe Thornber
03aee97527 o list.h from kernel for userland tools to use. 2001-09-28 13:19:17 +00:00
Joe Thornber
84ad4dabe2 o logical data structures 2001-09-28 13:15:30 +00:00
Joe Thornber
dc1acd03f8 o generic hash table to store void *'s, not efficient, but adequate for LVM. 2001-09-28 13:08:44 +00:00
Patrick Caulfield
30a9f48024 Fix prototype for malloc_aux 2001-09-27 10:01:17 +00:00
Patrick Caulfield
7bf5c85a05 Don't include asm/* files 2001-09-27 10:00:47 +00:00
Alasdair Kergon
269930c0da lvactivate checkpoint commit 2001-09-25 12:49:28 +00:00
Alasdair Kergon
795ca3e5b8 Makefiles & autoconf. 2001-09-21 12:37:43 +00:00
Alasdair Kergon
b5ab48be2a Initialise root node pointer. 2001-09-21 12:32:37 +00:00
Alasdair Kergon
961c946a6d Unused variables. 2001-09-21 12:31:57 +00:00
Patrick Caulfield
e8cd263509 Fix includes so that string functions get prototyped 2001-09-13 12:38:31 +00:00
Patrick Caulfield
7c045c523b Fix includes so that string functions get prototyped.
Fix cast - repeat after me Joe: "I must not cast pointers to ints"!
2001-09-13 12:38:08 +00:00
Patrick Caulfield
758af97c3b Set DEFAULT_ALIGNMENT to 8 for Alpha.
If you think this is wasteful on other arches then stick some ifdefs in.
2001-09-13 09:03:42 +00:00
AJ Lewis
a53d451f30 o Ok, this seems to be a much better method for caching valid
devices based on /proc/devices
   + The dev_mgr structure now has a 256 element char array that is
     initially all 0s
   + When a match is found, the array element corresponding to the major
     number of the match is set to a non-zero value
   + to check for a match, all one has to do is check that the array
     element at the major number in question is non-zero.
 o I'm wondering if we should do this with bitwise operators instead?  Does
   anyone expect the major numbers to grow larger than 8-bits?
2001-08-21 20:40:37 +00:00
AJ Lewis
83b2c0d30a o Quick and dirty *UGLY* hack of a /proc/devices cache using a linked list
o I don't like it, but I'm committing it so I can go back and laugh at
   myself later
 o I have a (hopefully) better idea that i'll try to commit yet today.
2001-08-21 19:51:04 +00:00
AJ Lewis
7af02225cc o Quick and dirty hack to get lvm_check_dev code into the dev-manager
o I'm working on caching the /proc/devices entries now, and should have
   that in by the end of today or early tomorrow.
 o There will be much cleanup involved with that...
2001-08-21 18:20:14 +00:00
AJ Lewis
bb6ddc2de7 o Added a basic makefile to build liblvm.a again
o Modified source files so that this works
2001-08-21 15:23:45 +00:00
AJ Lewis
a88c46c2d8 o Brought hash table code over from experimental 2001-08-21 15:22:59 +00:00
AJ Lewis
1993c0acc2 o Added _basic_ config file support to the device manager 2001-08-21 14:44:18 +00:00
AJ Lewis
d43feea5fa o Populating with stuff from experimental 2001-08-21 13:22:16 +00:00
Joe Thornber
df88dece8b o Populating with stuff from experimental 2001-08-21 12:56:08 +00:00
AJ Lewis
b653404542 o initial subdir population 2001-08-15 16:20:46 +00:00