public inbox for lvm2-cvs@sourceware.org help / color / mirror / Atom feed
From: agk@sourceware.org To: lvm-devel@redhat.com, lvm2-cvs@sourceware.org Subject: LVM2 ./WHATS_NEW daemons/clvmd/lvm-functions.c ... Date: Thu, 08 Dec 2011 21:24:00 -0000 [thread overview] Message-ID: <20111208212412.30358.qmail@sourceware.org> (raw) CVSROOT: /cvs/lvm2 Module name: LVM2 Changes by: agk@sourceware.org 2011-12-08 21:24:10 Modified files: . : WHATS_NEW daemons/clvmd : lvm-functions.c daemons/lvmetad: testclient.c lib/commands : toolcontext.c toolcontext.h lib/mm : memlock.c liblvm : lvm_base.c tools : lvmcmdline.c Log message: Only use built-in stack size in clvmd - ignore lvm.conf. Patches: http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2204&r2=1.2205 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.127&r2=1.128 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/lvmetad/testclient.c.diff?cvsroot=lvm2&r1=1.9&r2=1.10 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.c.diff?cvsroot=lvm2&r1=1.142&r2=1.143 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/commands/toolcontext.h.diff?cvsroot=lvm2&r1=1.47&r2=1.48 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/mm/memlock.c.diff?cvsroot=lvm2&r1=1.46&r2=1.47 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/liblvm/lvm_base.c.diff?cvsroot=lvm2&r1=1.22&r2=1.23 http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/lvmcmdline.c.diff?cvsroot=lvm2&r1=1.148&r2=1.149 --- LVM2/WHATS_NEW 2011/12/06 19:30:15 1.2204 +++ LVM2/WHATS_NEW 2011/12/08 21:24:08 1.2205 @@ -47,7 +47,7 @@ Fix lv_info open_count test for disabled verify_udev_operations (2.02.86). Simplify code for lvm worker thread in clvmd. Use pthread_barrier to synchronize clvmd threads at startup. - Limit clvmd's thread size to 128KiB. + Limit clvmd's thread size to 128KiB and ignore activation/reserved_stack. Reduce default preallocated stack size to 64KiB. Add check for access through NULL pointer when refresh_filter() fails. Use pthread condition for SINGLENODE lock implementation. --- LVM2/daemons/clvmd/lvm-functions.c 2011/12/08 18:32:34 1.127 +++ LVM2/daemons/clvmd/lvm-functions.c 2011/12/08 21:24:08 1.128 @@ -880,7 +880,7 @@ if (!get_initial_state(excl_uuid)) log_error("Cannot load initial lock states."); - if (!(cmd = create_toolcontext(1, NULL, 0))) { + if (!(cmd = create_toolcontext(1, NULL, 0, 1))) { log_error("Failed to allocate command context"); return 0; } --- LVM2/daemons/lvmetad/testclient.c 2011/07/20 15:15:41 1.9 +++ LVM2/daemons/lvmetad/testclient.c 2011/12/08 21:24:08 1.10 @@ -108,7 +108,7 @@ if (argc > 1) { int i; - struct cmd_context *cmd = create_toolcontext(0, NULL, 0); + struct cmd_context *cmd = create_toolcontext(0, NULL, 0, 0); for (i = 1; i < argc; ++i) { const char *uuid = NULL; scan(h, argv[i]); --- LVM2/lib/commands/toolcontext.c 2011/11/28 20:37:51 1.142 +++ LVM2/lib/commands/toolcontext.c 2011/12/08 21:24:09 1.143 @@ -1224,7 +1224,8 @@ /* Entry point */ struct cmd_context *create_toolcontext(unsigned is_long_lived, const char *system_dir, - unsigned set_buffering) + unsigned set_buffering, + unsigned threaded) { struct cmd_context *cmd; @@ -1246,6 +1247,7 @@ return NULL; } cmd->is_long_lived = is_long_lived; + cmd->threaded = threaded ? 1 : 0; cmd->handles_missing_pvs = 0; cmd->handles_unknown_segments = 0; cmd->independent_metadata_areas = 0; --- LVM2/lib/commands/toolcontext.h 2011/11/28 20:37:52 1.47 +++ LVM2/lib/commands/toolcontext.h 2011/12/08 21:24:09 1.48 @@ -85,6 +85,7 @@ unsigned partial_activation:1; unsigned si_unit_consistency:1; unsigned metadata_read_only:1; + unsigned threaded:1; /* Set if running within a thread e.g. clvmd */ unsigned independent_metadata_areas:1; /* Active formats have MDAs outside PVs */ @@ -117,7 +118,8 @@ */ struct cmd_context *create_toolcontext(unsigned is_long_lived, const char *system_dir, - unsigned set_buffering); + unsigned set_buffering, + unsigned threaded); void destroy_toolcontext(struct cmd_context *cmd); int refresh_toolcontext(struct cmd_context *cmd); int refresh_filters(struct cmd_context *cmd); --- LVM2/lib/mm/memlock.c 2011/08/30 14:55:18 1.46 +++ LVM2/lib/mm/memlock.c 2011/12/08 21:24:09 1.47 @@ -445,9 +445,10 @@ void memlock_init(struct cmd_context *cmd) { - _size_stack = find_config_tree_int(cmd, - "activation/reserved_stack", - DEFAULT_RESERVED_STACK) * 1024; + /* When threaded, caller already limited stack size so just use the default. */ + _size_stack = 1024 * (cmd->threaded ? DEFAULT_RESERVED_STACK : + find_config_tree_int(cmd, "activation/reserved_stack", + DEFAULT_RESERVED_STACK)); _size_malloc_tmp = find_config_tree_int(cmd, "activation/reserved_memory", DEFAULT_RESERVED_MEMORY) * 1024; --- LVM2/liblvm/lvm_base.c 2011/06/15 13:29:48 1.22 +++ LVM2/liblvm/lvm_base.c 2011/12/08 21:24:09 1.23 @@ -37,7 +37,7 @@ /* create context */ /* FIXME: split create_toolcontext */ /* FIXME: make all globals configurable */ - cmd = create_toolcontext(0, system_dir, 1); + cmd = create_toolcontext(0, system_dir, 1, 0); if (!cmd) return NULL; --- LVM2/tools/lvmcmdline.c 2011/09/16 12:10:02 1.148 +++ LVM2/tools/lvmcmdline.c 2011/12/08 21:24:10 1.149 @@ -1237,7 +1237,7 @@ if (!udev_init_library_context()) stack; - if (!(cmd = create_toolcontext(0, NULL, 1))) + if (!(cmd = create_toolcontext(0, NULL, 1, 0))) return_NULL; _cmdline.arg_props = &_arg_props[0];
next reply other threads:[~2011-12-08 21:24 UTC|newest] Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top 2011-12-08 21:24 agk [this message] -- strict thread matches above, loose matches on Subject: below -- 2012-01-20 0:27 jbrassow 2011-09-27 22:43 agk 2011-08-10 20:25 zkabelac 2011-02-18 14:16 zkabelac 2011-02-18 0:36 jbrassow 2011-02-04 20:30 jbrassow 2011-02-03 16:03 zkabelac 2011-02-03 1:58 zkabelac 2010-12-08 20:51 agk 2010-11-23 1:56 agk 2010-03-26 15:40 snitzer 2010-03-23 22:30 snitzer 2010-01-19 13:25 mbroz 2010-01-05 16:09 mbroz 2010-01-05 16:06 mbroz 2010-01-05 16:03 mbroz 2009-11-23 10:44 mbroz 2009-07-24 18:15 agk 2009-07-16 0:37 agk 2009-07-15 23:57 agk 2009-07-13 19:49 agk 2009-06-12 8:30 mbroz 2009-02-22 21:14 agk 2009-01-26 19:01 agk 2008-09-19 6:42 agk 2007-08-07 9:06 meyering 2007-01-25 14:37 agk 2007-01-23 15:58 agk 2007-01-19 22:21 agk 2006-05-11 19:05 agk 2006-03-09 22:34 agk 2005-08-14 23:18 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=20111208212412.30358.qmail@sourceware.org \ --to=agk@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).