1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-03-28 02:50:41 +03:00

o Always set LVM_READ.

o Avoid duplicate deallocation.
This commit is contained in:
Alasdair Kergon 2001-11-07 22:47:43 +00:00
parent fbdb7953db
commit 4f7a219dac
3 changed files with 11 additions and 17 deletions

View File

@ -59,7 +59,7 @@ int lv_active(struct logical_volume *lv, int *result)
if (!(dmt = _info(lv))) {
stack;
goto out;
return 0;
}
if (!dm_task_exists(dmt, result)) {
@ -81,7 +81,7 @@ int lv_open_count(struct logical_volume *lv, int *result)
if (!(dmt = _info(lv))) {
stack;
goto out;
return 0;
}
if (!dm_task_open_count(dmt, result)) {

View File

@ -31,6 +31,11 @@ char *display_uuid(char *uuidstr);
void pvdisplay_colons(struct physical_volume *pv);
void pvdisplay_full(struct physical_volume *pv);
void lvdisplay_colons(struct logical_volume *lv);
void lvdisplay_extents(struct logical_volume *lv);
void lvdisplay_full(struct logical_volume *lv);
#if 0
void pv_show_short(pv_t * pv);
void pv_display_pe(pv_t * pv, pe_disk_t * pe);

View File

@ -1,20 +1,7 @@
/*
* Copyright (C) 2001 Sistina Software
* Copyright (C) 2001 Sistina Software
*
* LVM is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* LVM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LVM; see the file COPYING. If not, write to
* the Free Software Foundation, 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
* This file is released under the GPL.
*
*/
@ -77,6 +64,8 @@ int lvcreate(int argc, char **argv)
if (arg_count(permission_ARG))
status |= arg_int_value(permission_ARG, 0);
else
status |= LVM_READ | LVM_WRITE;
if (arg_count(readahead_ARG))
read_ahead = arg_int_value(readahead_ARG, 0);