public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: wysochanski@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2/lib/metadata metadata.c Date: Sun, 26 Jul 2009 01:52:00 -0000 [thread overview] Message-ID: <20090726015219.5263.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: wysochanski@sourceware.org 2009-07-26 01:52:19 Modified files: lib/metadata : metadata.c Log message: Remove unneeded pv_create wrapper function. Author: Dave Wysochanski <dwysocha@redhat.com> Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/metadata.c.diff?cvsroot=lvm2&r1=1.260&r2=1.261 --- LVM2/lib/metadata/metadata.c 2009/07/24 15:15:26 1.260 +++ LVM2/lib/metadata/metadata.c 2009/07/26 01:52:19 1.261 @@ -44,16 +44,6 @@ uint64_t *label_sector, int warnings, int scan_label_only); -static struct physical_volume *_pv_create(const struct format_type *fmt, - struct device *dev, - struct id *id, uint64_t size, - unsigned long data_alignment, - uint64_t pe_start, - uint32_t existing_extent_count, - uint32_t existing_extent_size, - int pvmetadatacopies, - uint64_t pvmetadatasize, struct dm_list *mdas); - static int _pv_write(struct cmd_context *cmd __attribute((unused)), struct physical_volume *pv, struct dm_list *mdas, int64_t label_sector); @@ -964,44 +954,6 @@ return 1; } -/** - * pv_create - initialize a physical volume for use with a volume group - * @fmt: format type - * @dev: PV device to initialize - * @id: PV UUID to use for initialization - * @size: size of the PV in sectors - * @data_alignment: requested alignment of data - * @pe_start: physical extent start - * @existing_extent_count - * @existing_extent_size - * @pvmetadatacopies - * @pvmetadatasize - * @mdas - * - * Returns: - * PV handle - physical volume initialized successfully - * NULL - invalid parameter or problem initializing the physical volume - * - * Note: - * FIXME - liblvm todo - tidy up arguments for external use (fmt, mdas, etc) - */ -pv_t *pv_create(const struct cmd_context *cmd, - struct device *dev, - struct id *id, uint64_t size, - unsigned long data_alignment, - uint64_t pe_start, - uint32_t existing_extent_count, - uint32_t existing_extent_size, - int pvmetadatacopies, - uint64_t pvmetadatasize, struct dm_list *mdas) -{ - return _pv_create(cmd->fmt, dev, id, size, data_alignment, pe_start, - existing_extent_count, - existing_extent_size, - pvmetadatacopies, - pvmetadatasize, mdas); -} - static void _free_pv(struct dm_pool *mem, struct physical_volume *pv) { dm_pool_free(mem, pv); @@ -1035,8 +987,28 @@ return pv; } -/* Sizes in sectors */ -static struct physical_volume *_pv_create(const struct format_type *fmt, +/** + * pv_create - initialize a physical volume for use with a volume group + * + * @fmt: format type + * @dev: PV device to initialize + * @size: size of the PV in sectors + * @data_alignment: requested alignment of data + * @pe_start: physical extent start + * @existing_extent_count + * @existing_extent_size + * @pvmetadatacopies + * @pvmetadatasize + * @mdas + * + * Returns: + * PV handle - physical volume initialized successfully + * NULL - invalid parameter or problem initializing the physical volume + * + * Note: + * FIXME: shorten argument list and replace with explict 'set' functions + */ +struct physical_volume *pv_create(const struct cmd_context *cmd, struct device *dev, struct id *id, uint64_t size, unsigned long data_alignment, @@ -1046,6 +1018,7 @@ int pvmetadatacopies, uint64_t pvmetadatasize, struct dm_list *mdas) { + const struct format_type *fmt = cmd->fmt; struct dm_pool *mem = fmt->cmd->mem; struct physical_volume *pv = _alloc_pv(mem, dev);
next reply other threads:[~2009-07-26 1:52 UTC|newest] Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top 2009-07-26 1:52 wysochanski [this message] -- strict thread matches above, loose matches on Subject: below -- 2012-03-12 14:43 zkabelac 2012-03-01 9:46 zkabelac 2012-02-29 0:19 mornfall 2012-02-29 0:18 mornfall 2012-02-28 11:10 zkabelac 2012-02-27 9:54 zkabelac 2012-02-12 20:19 agk 2012-01-25 8:50 zkabelac 2011-04-01 14:54 prajnoha 2011-03-30 13:35 zkabelac 2011-03-10 22:39 zkabelac 2011-02-21 12:13 prajnoha 2011-02-14 19:27 mornfall 2010-12-14 17:07 mornfall 2010-11-30 11:15 mornfall 2010-10-25 13:35 zkabelac 2010-07-30 16:47 wysochanski 2010-07-09 16:57 wysochanski 2010-07-08 17:41 wysochanski 2010-07-06 20:09 agk 2010-07-06 17:29 agk 2010-07-06 17:27 agk 2010-07-06 17:26 agk 2010-06-30 19:55 wysochanski 2010-06-30 14:54 agk 2010-06-30 14:52 agk 2010-06-30 14:48 wysochanski 2010-06-30 14:27 agk 2010-06-28 20:38 wysochanski 2010-06-28 20:38 wysochanski 2010-06-28 20:37 wysochanski 2010-06-28 20:35 wysochanski 2010-06-28 20:35 wysochanski 2010-04-08 15:18 wysochanski 2010-04-06 14:03 wysochanski 2010-04-01 13:08 agk 2010-04-01 11:45 agk 2010-02-24 18:15 wysochanski 2010-01-21 21:04 wysochanski 2010-01-21 21:04 wysochanski 2010-01-07 14:29 zkabelac 2009-12-16 19:26 mornfall 2009-11-19 13:44 mornfall 2009-10-05 20:02 wysochanski 2009-10-05 20:02 wysochanski 2009-09-02 21:39 wysochanski 2009-08-10 17:15 wysochanski 2009-07-28 20:41 agk 2009-07-26 12:41 wysochanski 2009-07-26 1:53 wysochanski 2009-07-24 15:15 wysochanski 2009-07-16 20:18 wysochanski 2009-07-01 17:03 wysochanski 2009-06-10 16:14 wysochanski 2009-05-13 1:48 agk 2009-04-28 17:46 wysochanski 2009-04-10 10:01 mbroz 2009-04-02 15:01 mbroz 2009-02-23 16:53 mbroz 2009-01-26 22:22 agk 2008-08-13 13:42 zkabelac 2008-01-22 16:02 agk 2008-01-16 22:52 agk 2007-10-12 21:08 wysochanski 2007-08-06 21:11 wysochanski 2007-07-12 4:12 wysochanski 2007-06-13 21:14 wysochanski 2007-06-12 21:39 wysochanski 2006-10-07 23:06 agk 2005-04-19 20:44 agk 2005-04-17 23:59 agk 2004-03-26 21:07 agk
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090726015219.5263.qmail@sourceware.org \ --to=wysochanski@sourceware.org \ --cc=lvm-devel@redhat.com \ --cc=lvm2-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).