1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-10-28 03:27:58 +03:00
Commit Graph

62 Commits

Author SHA1 Message Date
Alasdair Kergon
67cdbd7e4d Some whitespace tidy-ups. 2008-01-30 14:00:02 +00:00
Alasdair Kergon
c51b9fff19 Use stack return macros throughout. 2008-01-30 13:19:47 +00:00
Alasdair Kergon
962b2a559d Rely upon internally-cached PV labels while corresponding VG lock is held. 2008-01-29 23:45:48 +00:00
Jim Meyering
b45b846449 Include strerror string in dev_open_flags' stat failure message.
* lib/device/dev-io.c (dev_open_flags):
Use log_sys_error after failed stat to report strerror(errno).
Use a slightly different diagnostic to report mismatched device number.
2007-09-07 11:24:19 +00:00
Alasdair Kergon
be6845999b Fix inconsistent licence notices: executables are GPLv2; libraries LGPLv2.1. 2007-08-20 20:55:30 +00:00
Dave Wysochanski
662e0238f0 Add dev_read_circular, read 2 regions on same device. 2007-04-19 02:10:42 +00:00
Alasdair Kergon
2e1b92e3ea Add some missing close() and fclose() return code checks.
Fix exit statuses of reporting tools (2.02.19).
2007-01-25 14:37:48 +00:00
Alasdair Kergon
4dc0ec2253 Adjust some alignments for ia64 and sparc.
(Some of the changes are probably unnecessary.)
2006-11-30 23:11:42 +00:00
Alasdair Kergon
916490f8bf Add lvm_getpagesize wrapper. 2006-08-17 18:23:44 +00:00
Alasdair Kergon
5c9d70c955 Create a log header for replacement in-sync mirror log.
Use set_lv() and dev_set() to wipe sections of devices.
Add mirror_in_sync() flag to avoid unnecessary resync on activation.
2006-05-11 18:39:24 +00:00
Alasdair Kergon
349216a6b5 Fix open RO->RW promotions. 2005-11-23 16:07:40 +00:00
Alasdair Kergon
b7c18fecfd Only keep devices open if known to belong to a locked VG now. 2005-10-27 17:44:55 +00:00
Alasdair Kergon
2262b32057 Use hash, bitset, malloc, pool from libdevmapper. 2005-10-16 23:03:59 +00:00
Alasdair Kergon
9b02bdbce0 Refuse to run pvcreate/pvremove on devices we can't open exclusively. 2005-10-03 21:10:41 +00:00
Alasdair Kergon
15db9fcfbf Reinstate full PV size when removing from VG.
Support loopfiles for testing.
Complete the pv_segment support.
2005-05-03 17:28:23 +00:00
Alasdair Kergon
0c86ac44a9 fix unused o_direct label 2005-04-07 12:25:33 +00:00
Alasdair Kergon
864de9cee1 Allow offline extension of snapshot volumes.
NB Requires kernel patch that is not upstream.
2005-04-07 12:17:46 +00:00
Alasdair Kergon
aa70fe8b71 Suppress 'open failed' error messages during scanning. 2005-03-03 21:54:35 +00:00
Alasdair Kergon
165f49ba1d Fix device reference counting on re-opens. 2004-12-21 20:23:16 +00:00
Alasdair Kergon
d46fd67fb6 Skip devices that are too small to be PVs. 2004-12-21 17:54:52 +00:00
Alasdair Kergon
5e94864311 Reopen RO file descriptor RW if necessary. 2004-12-12 21:47:14 +00:00
Alasdair Kergon
09a7dce6be Additional device-handling debug messages.
Additional verbosity level -vvvv includes line numbers and backtraces.
Verbose messages now go to stderr not stdout.
Close any stray file descriptors before starting.
Refine partitionable checks for certain device types.
Allow devices/types to override built-ins.
2004-12-10 16:01:35 +00:00
Alasdair Kergon
39de4a2a56 Extend dev_open logging. 2004-12-09 16:56:51 +00:00
Alasdair Kergon
60bd717971 Use O_NOATIME on devices if available. 2004-09-14 22:23:23 +00:00
Alasdair Kergon
1c31f23f56 Add a const. 2004-08-11 13:15:35 +00:00
Alasdair Kergon
96185e9ca1 Use 64-bit file functions. 2004-04-16 18:43:29 +00:00
Alasdair Kergon
6606c3ae81 Update copyright notices. 2004-03-30 19:35:44 +00:00
Alasdair Kergon
82c86650e1 Define BLKGETSIZE64 on systems with out-of-date header files. 2004-01-27 20:53:57 +00:00
Alasdair Kergon
e19f549a11 Fix support for PVs on read only devices. [Still must set LVs read only] 2003-11-21 19:54:40 +00:00
Alasdair Kergon
ee8518bd9c lvcreate should close the initialised snapshot device immediately. 2003-11-14 17:55:39 +00:00
Alasdair Kergon
27642fade0 Fix dev_zero() offset. 2003-11-13 23:55:03 +00:00
Alasdair Kergon
2dc95e1c41 Configuration-time O_DIRECT setting. 2003-11-06 17:14:06 +00:00
Alasdair Kergon
914c97239f Another sync point - numerous fixes & clean ups. 2003-07-04 22:34:56 +00:00
Alasdair Kergon
4b7af6da11 Add comment 2003-04-30 15:21:10 +00:00
Alasdair Kergon
fe451a01e8 Try alternative syncs if BLKFLSBUF fails. 2003-04-28 16:20:39 +00:00
Alasdair Kergon
b896caa19b Improve build robustness. 2003-04-15 13:24:42 +00:00
Alasdair Kergon
4970ebfb92 o Additional device/filter-level debugging messages + duplicate alias fix
o 32/64-bit size_t fix (pjc)
2003-01-08 16:41:22 +00:00
Alasdair Kergon
8ef2b021ed Default stripesize 64k & config file setting for it;
Clear many compiler warnings (i386) & associated bugs - hopefully without
introducing too many new bugs:-)  (Same exercise required for other archs.)
Default compilation has optimisation - or else use ./configure --enable-debug
2002-12-19 23:25:55 +00:00
Alasdair Kergon
d1d9800ef1 Refactoring. 2002-11-18 14:01:16 +00:00
Patrick Caulfield
da253e3aac Remove O_DIRECT as it causes problems with some systems.
Harumph.
2002-08-14 14:58:00 +00:00
Patrick Caulfield
6b3b4a250b Use O_DIRECT for writing to devices.
Doesn't work on HPPA due to a kernel bug but other archs shuld be OK.
2002-07-22 08:10:54 +00:00
Patrick Caulfield
b40b90f035 Flush on open as well as close. 2002-06-25 14:02:28 +00:00
Alasdair Kergon
25b733809a Merge with text format branch.
Lots of changes/very little testing so far => there'll be bugs!

Use 'vgcreate -M text' to create a volume group with its metadata stored
in text files.  Text format metadata changes should be reasonably atomic,
with a (basic) automatic recovery mechanism if the system crashes while a
change is in progress.

Add a metadata section to lvm.conf to specify multiple directories if
you want (recommended) to keep multiple copies of the metadata (eg on
different filesystems).

e.g. metadata {
        dirs = ["/etc/lvm/metadata1","/usr/local/lvm/metadata2"]
}

Plenty of refinements still in the pipeline.
2002-04-24 18:20:51 +00:00
Joe Thornber
e3528bcda7 o Stop printing errors if flushing fails (could be an unconfigured device). 2002-04-24 08:37:34 +00:00
Joe Thornber
f31c47ade8 o Perform a BLKFLSBUF ioctl whenever a block device is closed.
Patrick, can you see if this fixes your cluster syncing problem please ?
If so I'll make it so it only syncs if you have actually written to the
device.
2002-04-08 18:59:50 +00:00
Alasdair Kergon
b849de1d18 Fix the device cache to cope reasonably safely with device name changes.
This should be a rare occurrence so the aim is to recover if it's
straightforward to do so, otherwise just to abort the operation.
If people *knowingly* change device names, they should always run vgscan
afterwards.

A few bytes of memory gets leaked inside a pool each time an alias
has to be discarded - it's not worth restructuring the code to reuse it.

More of LVM2 needs updating to pass device objects (or uuids) about
instead of pathnames so that resolution of pathname->object only happens
once per operation.

dev_cache_get() should now always return the *current* device at the path given

dev_name_confirmed() replaces dev_name() whenever it's important to
know that name for the device is still current (ie when opening it).
If the cache doesn't know a current name, the function fails.

dev_open() guarantees that the file descriptor returned is for the dev_t
of the device structure it was passed.
2002-01-24 23:16:19 +00:00
Alasdair Kergon
333658d5f8 Fix dev_close arg. 2002-01-24 13:31:18 +00:00
Alasdair Kergon
610c25e8b1 o Remove redundant symlink-handling code.
o When opening device, return error if its cached name is incorrect (eg if
  it's changed since the cache was generated).  This prevents use until
  the cache is rebuilt (eg with vgscan).  Doesn't catch every case.
2002-01-23 18:55:01 +00:00
Patrick Caulfield
52864eda2e Add a dev_get_sectsize call. 2001-12-11 10:18:49 +00:00
Alasdair Kergon
c2d72fd402 Add -t or --test arg to all tools that update metadata to avoid
committing metadata changes or (de)activating.
2001-11-28 18:03:11 +00:00