* [Bug 25280] r600: glPolygonStipple broken
From: bugzilla-daemon @ 2011-10-22 17:34 UTC (permalink / raw)
To: dri-devel
In-Reply-To: <bug-25280-502@http.bugs.freedesktop.org/>
https://bugs.freedesktop.org/show_bug.cgi?id=25280
gsr.bugs <gsr.bugs@infernal-iceberg.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |gsr.bugs@infernal-iceberg.c
| |om
--- Comment #6 from gsr.bugs <gsr.bugs@infernal-iceberg.com> 2011-10-22 10:34:40 PDT ---
r300c at least can use software fallbacks (see driconf), which make app like
Blender usable (polygon and line stipples are used to give feedback about item
relations, object types, selection status, etc). Should not Gallium also use
software fallbacks, at least as stop gap until shader method is coded?
Specially if r[36]00c are going to be deprecated in the near future.
--
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
^ permalink raw reply
* Re: [PATCH] base.bbclass: add subversion-native to DEPENDS if there is svn:// in SRC_URI
From: Saul Wold @ 2011-10-22 17:24 UTC (permalink / raw)
To: Patches and discussions about the oe-core layer; +Cc: Martin Jansa
In-Reply-To: <1319190483-5637-1-git-send-email-Martin.Jansa@gmail.com>
On 10/21/2011 02:48 AM, Martin Jansa wrote:
> Signed-off-by: Martin Jansa<Martin.Jansa@gmail.com>
> ---
> meta/classes/base.bbclass | 7 +++++++
> 1 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index f539744..bced226 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -401,6 +401,13 @@ python () {
> bb.note("SKIPPING %s because it's %s" % (pn, this_license))
> raise bb.parse.SkipPackage("incompatible with license %s" % this_license)
>
> + # Svn packages should DEPEND on subversion-native
> + srcuri = bb.data.getVar('SRC_URI', d, 1)
> + if "svn://" in srcuri:
> + depends = bb.data.getVarFlag('do_fetch', 'depends', d) or ""
> + depends = depends + " subversion-native:do_populate_sysroot"
> + bb.data.setVarFlag('do_fetch', 'depends', depends, d)
> +
> # Git packages should DEPEND on git-native
> srcuri = bb.data.getVar('SRC_URI', d, 1)
> if "git://" in srcuri:
This change introduces a circular dependency when I tried to build.
Sau!
^ permalink raw reply
* [PATCH 2/2] credential-cache--daemon.c: unlink() a potentially stale unix socket
From: Ramsay Jones @ 2011-10-22 17:25 UTC (permalink / raw)
To: Jeff King; +Cc: GIT Mailing-list
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
credential-cache--daemon.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c
index ee2c15a..c5fb1b2 100644
--- a/credential-cache--daemon.c
+++ b/credential-cache--daemon.c
@@ -230,6 +230,7 @@ static void serve_cache(const char *socket_path)
{
int fd;
+ unlink(socket_path);
fd = unix_stream_listen(socket_path);
if (fd < 0)
die_errno("unable to bind to '%s'", socket_path);
--
1.7.7
^ permalink raw reply related
* [PATCH 1/2] credential-cache--daemon.c: Don't leave stale socket on --exit
From: Ramsay Jones @ 2011-10-22 17:24 UTC (permalink / raw)
To: Jeff King; +Cc: GIT Mailing-list
Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---
credential-cache--daemon.c | 23 ++++++++++++-----------
1 files changed, 12 insertions(+), 11 deletions(-)
diff --git a/credential-cache--daemon.c b/credential-cache--daemon.c
index 128c5ce..ee2c15a 100644
--- a/credential-cache--daemon.c
+++ b/credential-cache--daemon.c
@@ -137,22 +137,22 @@ static int read_credential_request(FILE *fh, struct credential *c,
return 0;
}
-static void serve_one_client(FILE *in, FILE *out)
+static int serve_one_client(FILE *in, FILE *out)
{
struct credential c = { NULL };
int timeout = -1;
char *action = NULL;
if (read_credential_request(in, &c, &action, &timeout) < 0)
- return;
+ return 1;
if (!action) {
warning("cache client didn't specify an action");
- return;
+ return 1;
}
if (!strcmp(action, "exit"))
- exit(0);
+ return 0;
if (!strcmp(action, "get")) {
struct credential_cache_entry *e = lookup_credential(&c);
@@ -160,27 +160,27 @@ static void serve_one_client(FILE *in, FILE *out)
fprintf(out, "username=%s\n", e->item.username);
fprintf(out, "password=%s\n", e->item.password);
}
- return;
+ return 1;
}
if (!strcmp(action, "erase")) {
remove_credential(&c);
- return;
+ return 1;
}
if (!strcmp(action, "store")) {
if (timeout < 0) {
warning("cache client didn't specify a timeout");
- return;
+ return 1;
}
remove_credential(&c);
cache_credential(&c, timeout);
- return;
+ return 1;
}
warning("cache client sent unknown action: %s", action);
- return;
+ return 1;
}
static int serve_cache_loop(int fd)
@@ -201,7 +201,7 @@ static int serve_cache_loop(int fd)
}
if (pfd.revents & POLLIN) {
- int client, client2;
+ int client, client2, ret;
FILE *in, *out;
client = accept(fd, NULL, NULL);
@@ -218,9 +218,10 @@ static int serve_cache_loop(int fd)
in = xfdopen(client, "r");
out = xfdopen(client2, "w");
- serve_one_client(in, out);
+ ret = serve_one_client(in, out);
fclose(in);
fclose(out);
+ return ret;
}
return 1;
}
--
1.7.7
^ permalink raw reply related
* [PATCH 0/2] git-credential-cache--daemon on Cygwin
From: Ramsay Jones @ 2011-10-22 17:23 UTC (permalink / raw)
To: Jeff King; +Cc: GIT Mailing-list
Hi Jeff,
When the 'jk/http-auth-keyring' branch was in next (and later back
in pu), I noticed that the t0300-credentials.sh test failing on cygwin.
I had a quick look, and found that unix_stream_listen() was failing to
bind() to a stale unix socket. The code looked OK to me, and should have
handled this just fine, but didn't ...
On a hunch, I found that the following "belt-n-braces" approach fixed the
the test for me:
-- >8 --
diff --git a/unix-socket.c b/unix-socket.c
index cf9890f..d974e01 100644
--- a/unix-socket.c
+++ b/unix-socket.c
@@ -42,7 +42,9 @@ int unix_stream_listen(const char *path)
fd = unix_stream_socket();
if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) < 0) {
+ close(fd);
unlink(path);
+ fd = unix_stream_socket();
if (bind(fd, (struct sockaddr *)&sa, sizeof(sa)) < 0) {
close(fd);
return -1;
-- 8< --
However, I don't particularly like the above solution, so I decided to take
a look at credential-cache--daemon to see why it was leaving a stale socket
in the first place. The following patches are the result:
[PATCH 1/2] credential-cache--daemon.c: Don't leave stale socket on --exit
[PATCH 2/2] credential-cache--daemon.c: unlink() a potentially stale unix socket
Note that, in serve_one_client(), the "--exit" action results in the server
exit(0)-ing immediately without close()-ing and unlink()-ing the socket.
So, patch #1 changes serve_one_client() to return a value to serve_cache_loop()
which indicates whether it's caller (serve_cache()) should exit from the main
server loop. This results in the socket being cleaned up correctly in the "--exit"
case.
Note that this does not eliminate all early-exit code paths (for example, we note
an die_errno() call), so it is still possible for the server to exit without
having cleaned up the socket, so patch #2 adds on unlink() call to the beginning of
serve_cache().
Note that each of these patches, separately and together, fix the test on cygwin.
Assuming that a modified http-auth-keyring series will make a return to pu
sometime, could you please squash these patches into (the patch corresponding to)
commit 2d6874d (credentials: add "cache" helper, 18-07-2011). Thanks!
Also, note that this series breaks the build on MinGW. The patch to fix the build
is rather simple, but the result doesn't work, of course, because winsock does
not know about AF_UNIX (or AF_LOCAL). I started to code an win32 emulation of unix
sockets, but stopped working on it when this branch dropped from next. If you
intend to re-submit this work, then I can pick this up again.
HTH.
ATB,
Ramsay Jones
^ permalink raw reply related
* Re: [PATCH 1/4] nl80211: Add probe response offload attribute
From: Guy Eilam @ 2011-10-22 17:26 UTC (permalink / raw)
To: Johannes Berg; +Cc: linux-wireless
In-Reply-To: <1319290618.3956.6.camel@jlt3.sipsolutions.net>
On Sat, Oct 22, 2011 at 3:36 PM, Johannes Berg
<johannes@sipsolutions.net> wrote:
> On Sat, 2011-10-22 at 15:34 +0200, Johannes Berg wrote:
>> On Sat, 2011-10-22 at 15:11 +0200, Guy Eilam wrote:
>>
>> > +enum nl80211_probe_resp_offload_support_attr {
>> > + NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS,
>> > + NL80211_PROBE_RESP_OFFLOAD_SUPPORT_WPS2,
>> > + NL80211_PROBE_RESP_OFFLOAD_SUPPORT_P2P,
>> > +};
>>
>> I think doing = 1<<N here would be nicer to use in drivers & userspace.
>
> Hm, also: should we call this WPS or WSC, and do we need to distinguish
> WPS and WPS2? My AP mode patch called it WSC in a different context but
> I can change, we just should be consistent.
>
>> > + * @get_probe_resp_offload: Get probe response offload support from driver.
>>
>> and this seems unnecessary -- why not just put a u32 value into struct
>> wiphy?
>
> Oh, and probably a regular WIPHY flag that indicates whether the
> attribute should be added at all so that it can also be 0 but present
> (presence with 0 value indicates something other than not present).
When this is not supported a -EOPNOTSUPP should be returned.
A 0 return means that it is supported.
I now see that I have a small mistake in the patch regarding this.
The check should be (res >= 0) and not (!res).
I'll fix it.
>
> johannes
>
>
^ permalink raw reply
* Re: [PATCH v2 1/2] ASoC: core: Add flag to ignore pmdown_time at pcm_close
From: Vinod Koul @ 2011-10-22 17:17 UTC (permalink / raw)
To: Mark Brown
Cc: Peter Ujfalusi, alsa-devel@alsa-project.org, Liam Girdwood,
Babu, Ramesh, Misael Lopez Cruz
In-Reply-To: <20111022094552.GA3382@opensource.wolfsonmicro.com>
On Sat, 2011-10-22 at 10:45 +0100, Mark Brown wrote:
> On Fri, Oct 21, 2011 at 04:28:44PM +0530, Babu, Ramesh wrote:
>
> > If it is a board specific requirement, then would it make sense to have it in
> > dai_link as per Peter Ujfaulsi's RFC [1].
>
> Possibly for your case - the case this was originally written for was
> rather different, the CODEC has issues which mean it always needs to
> skip the delay so having to specify this for every single board is going
> to be repetitive.
>
> > In general, how this kind of situation is handled?
>
> Usually by keeping the clocks available.
That does not seem to be possible here :(
The codec takes the clock from modem. The codec doesn't have control
over it. The voice call termination kills the clock and the DAPM power
down produces noticeable artifacts.
Since this is board property, machine driver should tell DAPM to power
down immediately for this DAI alone. That of course allows us to reap
benefits of DAPM not power cycling codec during close/open.
--
~Vinod
^ permalink raw reply
* Re: [PATCH 1/2] LSM: Do not apply mmap_min_addr check to PROT_NONE mappings
From: Roland McGrath @ 2011-10-22 17:24 UTC (permalink / raw)
To: Linus Torvalds
Cc: Andrew Morton, James Morris, Eric Paris, Stephen Smalley, selinux,
John Johansen, linux-security-module, linux-kernel
In-Reply-To: <CA+55aFy3ALC34AyrsHi9yjBgRMwg9G5w2PhDfr_JVti1M8GbNQ@mail.gmail.com>
> So I'm not against this, but I'm wondering what triggers the need for it?
>
> It does make the security checks more complicated, since now
> mprotect() suddenly has to care about mmap_min_addr. So I don't think
> it's a security enhancement ("attempt to ensure robustness").
>
> But if there is some actual use-case that is shown to be helped,
> please document that n the explanations for the changeset.
It's exactly the case that I did mention: an application's own attempt to
ensure robustness by doing a PROT_NONE mmap of the [0,0x10000) region. An
application cannot presume that this region is already precluded from being
used by any non-MAP_FIXED mmap across all systems and configurations, so
it's defensive coding to explicitly block it off with a PROT_NONE mapping.
Since we know mmap_min_addr-type constraints might exist, we start at 0 and
move up a page as long as mmap fails. That works fine to cover e.g. the
[0x1000,0x10000) region when mmap_min_addr is set to 4096, as is common.
However, under SELinux these harmless attempts are diagnosed as MMAP_ZERO
avc denials, which percolate up to the user as scare warnings that the
application was prevented from doing something dangerous and possibly
malicious, when that's not the case at all.
Thanks,
Roland
^ permalink raw reply
* Re: [PATCH 5/5] ext4: Fix endian problem in MMP initialization
From: Andreas Dilger @ 2011-10-22 17:25 UTC (permalink / raw)
To: Darrick J. Wong
Cc: Tao Ma, Theodore Tso, linux-ext4@vger.kernel.org, linux-kernel
In-Reply-To: <20111021211825.10784.97113.stgit@elm3c44.beaverton.ibm.com>
You can add my
Acked-by: Andreas Dilger <adilger@dilger.ca>
to this.
Cheers, Andreas
On 2011-10-21, at 3:18 PM, "Darrick J. Wong" <djwong@us.ibm.com> wrote:
> As part of startup, the MMP initialization code does this:
>
> mmp->mmp_seq = seq = cpu_to_le32(mmp_new_seq());
>
> Next, mmp->mmp_seq is written out to disk, a delay happens, and then the MMP
> block is read back in and the sequence value is tested:
>
> if (seq != le32_to_cpu(mmp->mmp_seq)) {
> /* fail the mount */
>
> On a LE system such as x86, the *le32* functions do nothing and this works.
> Unfortunately, on a BE system such as ppc64, this comparison becomes:
>
> if (cpu_to_le32(new_seq) != le32_to_cpu(cpu_to_le32(new_seq)) {
> /* fail the mount */
>
> Except for a few palindromic sequence numbers, this test always causes the
> mount to fail, which makes MMP filesystems generally unmountable on ppc64. The
> attached patch fixes this situation.
>
> Signed-off-by: Darrick J. Wong <djwong@us.ibm.com>
> ---
> fs/ext4/mmp.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
>
> diff --git a/fs/ext4/mmp.c b/fs/ext4/mmp.c
> index 9bdef3f..a7a4986 100644
> --- a/fs/ext4/mmp.c
> +++ b/fs/ext4/mmp.c
> @@ -295,7 +295,8 @@ skip:
> /*
> * write a new random sequence number.
> */
> - mmp->mmp_seq = seq = cpu_to_le32(mmp_new_seq());
> + seq = mmp_new_seq();
> + mmp->mmp_seq = cpu_to_le32(seq);
>
> retval = write_mmp_block(bh);
> if (retval)
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* [PATCH] make the sample pre-commit hook script reject names with newlines, too
From: Jim Meyering @ 2011-10-22 17:19 UTC (permalink / raw)
To: git list
The sample pre-commit hook script would fail to reject a file name
like "a\nb" because of the way newlines are handled in "$(...)".
Adjust the test to count filtered bytes and require there be 0.
Also print all diagnostics to standard error, not stdout, so they
will actually be seen.
Signed-off-by: Jim Meyering <meyering@redhat.com>
---
templates/hooks--pre-commit.sample | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/templates/hooks--pre-commit.sample b/templates/hooks--pre-commit.sample
index b187c4b..1addec5 100755
--- a/templates/hooks--pre-commit.sample
+++ b/templates/hooks--pre-commit.sample
@@ -18,6 +18,9 @@ fi
# If you want to allow non-ascii filenames set this variable to true.
allownonascii=$(git config hooks.allownonascii)
+# Redirect output to stderr.
+exec 1>&2
+
# Cross platform projects tend to avoid non-ascii filenames; prevent
# them from being added to the repository. We exploit the fact that the
# printable range starts at the space character and ends with tilde.
@@ -26,7 +29,7 @@ if [ "$allownonascii" != "true" ] &&
# even required, for portability to Solaris 10's /usr/bin/tr), since
# the square bracket bytes happen to fall in the designated range.
test "$(git diff --cached --name-only --diff-filter=A -z $against |
- LC_ALL=C tr -d '[ -~]\0')"
+ LC_ALL=C tr -d '[ -~]\0' | wc -c)" != 0
then
echo "Error: Attempt to add a non-ascii file name."
echo
@@ -43,4 +46,5 @@ then
exit 1
fi
+# If there are whitespace errors, print the offending file names and fail.
exec git diff-index --check --cached $against --
--
1.7.7.419.g87009
^ permalink raw reply related
* [PATCH] kbuild: silence moc when V=0
From: Peter Foley @ 2011-10-22 17:10 UTC (permalink / raw)
To: Linux Kernel Mailing List, Linux Kbuild Mailing List, mmarek
Use quiet_cmd to silence moc when V=0
Signed-off-by: Peter Foley <pefoley2@verizon.net>
---
scripts/kconfig/Makefile | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index 1d99a08..7f1a6cd 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -322,8 +322,11 @@ $(obj)/zconf.tab.o: $(obj)/zconf.lex.c $(obj)/zconf.hash.c
$(obj)/qconf.o: $(obj)/qconf.moc
-$(obj)/%.moc: $(src)/%.h
- $(KC_QT_MOC) -i $< -o $@
+quiet_cmd_moc = MOC $@
+cmd_moc = $(KC_QT_MOC) -i $< -o $@
+
+$(obj)/qconf.moc: $(src)/qconf.h
+ $(call if_changed,moc)
# Extract gconf menu items for I18N support
$(obj)/gconf.glade.h: $(obj)/gconf.glade
--
1.7.7
^ permalink raw reply related
* copy_*_user
From: Xin Tong @ 2011-10-22 17:06 UTC (permalink / raw)
To: linux-kernel
I am investigating copy_from_user and copy_to_user in linux under
i386. These two function both take a pointer with virtual address and
a pointer with physical address.
copy_from_user calls __copy_from_user_ll and copy_to_user calls
__copy_to_user_ll. It make sense to me that __copy_to_user_ll converts
the virtual address to physical address using the current process's
page table.
unsigned long __copy_to_user_ll(void __user *to, const void *from,
unsigned long n)
{
...
retval = get_user_pages(current, current->mm,
(unsigned long)to, 1, 1, 0, &pg, NULL);
if (retval == -ENOMEM && is_global_init(current)) {
up_read(¤t->mm->mmap_sem);
congestion_wait(BLK_RW_ASYNC, HZ/50);
goto survive;
}
if (retval != 1) {
up_read(¤t->mm->mmap_sem);
break;
}
maddr = kmap_atomic(pg, KM_USER0);
memcpy(maddr + offset, from, len);
...
}
But it seems to be that __copy_from_user_ll is not converted the
address at all before attempting to copy. Can someone help explain to
me why ?
Thanks
^ permalink raw reply
* [PATCH] nl80211: clean up genlmsg_end uses
From: Johannes Berg @ 2011-10-22 17:05 UTC (permalink / raw)
To: John Linville; +Cc: linux-wireless
From: Johannes Berg <johannes.berg@intel.com>
genlmsg_end() cannot fail, it just returns the length
of the message. Thus, error handling for it is useless.
While removing it, I also noticed a useless variable
and removed this it as well.
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
---
net/wireless/nl80211.c | 97 +++++++++----------------------------------------
1 file changed, 19 insertions(+), 78 deletions(-)
--- a/net/wireless/nl80211.c 2011-10-22 19:00:10.000000000 +0200
+++ b/net/wireless/nl80211.c 2011-10-22 19:03:05.000000000 +0200
@@ -6634,10 +6634,7 @@ void nl80211_send_reg_change_event(struc
if (wiphy_idx_valid(request->wiphy_idx))
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY, request->wiphy_idx);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
rcu_read_lock();
genlmsg_multicast_allns(msg, 0, nl80211_regulatory_mcgrp.id,
@@ -6673,10 +6670,7 @@ static void nl80211_send_mlme_event(stru
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex);
NLA_PUT(msg, NL80211_ATTR_FRAME, len, buf);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -6757,10 +6751,7 @@ static void nl80211_send_mlme_timeout(st
NLA_PUT_FLAG(msg, NL80211_ATTR_TIMED_OUT);
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, addr);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -6816,10 +6807,7 @@ void nl80211_send_connect_result(struct
if (resp_ie)
NLA_PUT(msg, NL80211_ATTR_RESP_IE, resp_ie_len, resp_ie);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -6857,10 +6845,7 @@ void nl80211_send_roamed(struct cfg80211
if (resp_ie)
NLA_PUT(msg, NL80211_ATTR_RESP_IE, resp_ie_len, resp_ie);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -6898,10 +6883,7 @@ void nl80211_send_disconnected(struct cf
if (ie)
NLA_PUT(msg, NL80211_ATTR_IE, ie_len, ie);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, GFP_KERNEL);
@@ -6934,10 +6916,7 @@ void nl80211_send_ibss_bssid(struct cfg8
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, netdev->ifindex);
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -6972,10 +6951,7 @@ void nl80211_send_new_peer_candidate(str
if (ie_len && ie)
NLA_PUT(msg, NL80211_ATTR_IE, ie_len , ie);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -7014,10 +6990,7 @@ void nl80211_michael_mic_failure(struct
if (tsc)
NLA_PUT(msg, NL80211_ATTR_KEY_SEQ, 6, tsc);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -7068,10 +7041,7 @@ void nl80211_send_beacon_hint_event(stru
goto nla_put_failure;
nla_nest_end(msg, nl_freq);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
rcu_read_lock();
genlmsg_multicast_allns(msg, 0, nl80211_regulatory_mcgrp.id,
@@ -7114,10 +7084,7 @@ static void nl80211_send_remain_on_chan_
if (cmd == NL80211_CMD_REMAIN_ON_CHANNEL)
NLA_PUT_U32(msg, NL80211_ATTR_DURATION, duration);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -7188,10 +7155,7 @@ void nl80211_send_sta_del_event(struct c
NLA_PUT_U32(msg, NL80211_ATTR_IFINDEX, dev->ifindex);
NLA_PUT(msg, NL80211_ATTR_MAC, ETH_ALEN, mac_addr);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -7208,7 +7172,6 @@ int nl80211_send_mgmt(struct cfg80211_re
{
struct sk_buff *msg;
void *hdr;
- int err;
msg = nlmsg_new(NLMSG_DEFAULT_SIZE, gfp);
if (!msg)
@@ -7225,16 +7188,9 @@ int nl80211_send_mgmt(struct cfg80211_re
NLA_PUT_U32(msg, NL80211_ATTR_WIPHY_FREQ, freq);
NLA_PUT(msg, NL80211_ATTR_FRAME, len, buf);
- err = genlmsg_end(msg, hdr);
- if (err < 0) {
- nlmsg_free(msg);
- return err;
- }
+ genlmsg_end(msg, hdr);
- err = genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlpid);
- if (err < 0)
- return err;
- return 0;
+ return genlmsg_unicast(wiphy_net(&rdev->wiphy), msg, nlpid);
nla_put_failure:
genlmsg_cancel(msg, hdr);
@@ -7267,10 +7223,7 @@ void nl80211_send_mgmt_tx_status(struct
if (ack)
NLA_PUT_FLAG(msg, NL80211_ATTR_ACK);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast(msg, 0, nl80211_mlme_mcgrp.id, gfp);
return;
@@ -7312,10 +7265,7 @@ nl80211_send_cqm_rssi_notify(struct cfg8
nla_nest_end(msg, pinfoattr);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -7357,10 +7307,7 @@ void nl80211_gtk_rekey_notify(struct cfg
nla_nest_end(msg, rekey_attr);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -7403,10 +7350,7 @@ void nl80211_pmksa_candidate_notify(stru
nla_nest_end(msg, attr);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
@@ -7448,10 +7392,7 @@ nl80211_send_cqm_pktloss_notify(struct c
nla_nest_end(msg, pinfoattr);
- if (genlmsg_end(msg, hdr) < 0) {
- nlmsg_free(msg);
- return;
- }
+ genlmsg_end(msg, hdr);
genlmsg_multicast_netns(wiphy_net(&rdev->wiphy), msg, 0,
nl80211_mlme_mcgrp.id, gfp);
^ permalink raw reply
* [Buildroot] [RFC] Slides "Using Buildroot for real projects"
From: Thomas De Schampheleire @ 2011-10-22 17:04 UTC (permalink / raw)
To: buildroot
In-Reply-To: <20111021154303.43f98ccd@skate>
Hi Thomas,
On Fri, Oct 21, 2011 at 3:43 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Le Mon, 17 Oct 2011 18:47:18 +0200,
> Thomas Petazzoni <thomas.petazzoni@free-electrons.com> a ?crit :
>
>> The current (unfinished) status of my slides is visible at:
>> ? http://free-electrons.com/~thomas/pub/using-buildroot-real-project.pdf
>
> First of all, I'd like to thank Peter, Baruch, Thomas, Arnout and Will
> who gave some useful comments about my slides.
>
> At the same URL above, I have published a new version, which hopefully
> addresses your comments, and also adds some more slides on various
> topics. The slides should now, at least in terms of contents, represent
> what I had in mind for this talk.
>
> Now, if you're still willing to spend some time on this, I'd like to
> have comments on:
> ?* remaining english typos, wording improvements, etc.
> ?* suggestions of additional contents/topics if there is something I
> ? missed. Like if you use best practices that aren't described in
> ? those slides.
p4: s/build a kernel image/a kernel image/ (the 'build' is already
mentioned in the header)
p4: for symmetry reasons, I would suggest to start the last point also
with 'It builds' instead of 'Builds'
p4: the 'composed of Busybox' seems odd to me, because 'Busybox' is
one item. Maybe a native English speaker (Will?) can give feedback on
this. Suggestions from me are 'containing Busybox' or 'based on
Busybox'.
p4/5 title: on page 4 there is a question mark, not so on page 5.
p5: I'm unsure what you're trying to say with 'Standard languages
used'. If you refer to make, that was already covered on the previous
slide and may be redundant here.
p5: you're mainly typing full sentences, which is good IMO. But the
'Need to do complete rebuilds' is not consistent with that. I'd
suggest 'You need to ...'.
p10/11: reminder: still lists a TODO about build time
p12: s/more choice/more choices/ (at least, that's my feeling)
p12: first bullet says: "Buildroot complete rebuild", second says:
"complete Buildroot rebuild". This should be consistent. I prefer the
second one.
p24: s/Creating/Create/
p31: s/Mouting/Mounting/
Thanks for the credit, and:
Great job!
Best regards,
Thomas
^ permalink raw reply
* vmenter/exit
From: Xin Tong @ 2011-10-22 17:01 UTC (permalink / raw)
To: kvm-ia64
I would like to know the latest numbers on vmeter/exit for x86_64
Thanks
Xin
^ permalink raw reply
* Re: usbutils 005 release
From: Greg KH @ 2011-10-22 16:58 UTC (permalink / raw)
To: linux-usb; +Cc: linux-kernel
In-Reply-To: <20111022162326.GA749@kroah.com>
On Sat, Oct 22, 2011 at 06:23:26PM +0200, Greg KH wrote:
> Here's the 004 release of usbutils.
That would really be the 005 release, sorry about the confusion.
greg k-h
^ permalink raw reply
* Re: Kernel hard LOCKUP with v3.0.7
From: Greg KH @ 2011-10-22 16:55 UTC (permalink / raw)
To: Stefan Priebe; +Cc: LKML, Stable Tree
In-Reply-To: <4EA2F2E0.4020702@profihost.ag>
On Sat, Oct 22, 2011 at 06:44:16PM +0200, Stefan Priebe wrote:
> Hi,
>
> >Can you run 'git bisect' to try to find the problem patch? Oh, there is
> >one bugfix that I know of, bcd5cff7216f9b2de0a148cc355eac199dc6f1cf in
> >Linus's tree, can you try that to see if it solves the problem for you?
>
> this seems to fix it. Perhaps you should release v3.0.8 as the
> stable tree isn't stable right now? I mean this bug seems to be
> triggered on every SMP machine.
I will work to get it out soon.
thanks for testing and letting me know.
greg k-h
^ permalink raw reply
* Re: [PATCH] mmc: boot partition ro lock support
From: Chris Ball @ 2011-10-22 16:55 UTC (permalink / raw)
To: Linus Walleij
Cc: Andrei Warkentin, Ulf Hansson, Per Forlin, Lee Jones,
Johan Rudholm, John Beckett, linux-mmc
In-Reply-To: <CACRpkdY5T+QoyLvsPmwQRcNPoV=U=46LRGzKvK_8fSL8kurSwA@mail.gmail.com>
Hi Linus,
On Sat, Oct 22 2011, Linus Walleij wrote:
> So what about a cmdline approach? That makes it possible
> for people who are willingly recompiling and hacking their kernels
> to tinker with this if they absolutely want to go in on that
> partition, make it rw and change stuff.
>
> ...org have I just got all this backwards...?
Regarding this patch, we're not so worried that someone will take a
read-only boot partition and make it read-write and do something wrong;
sysfs is good enough to protect against that happening (at least by
mistake).
What we're worried about is someone issuing the perm read-only command,
and not realizing that it really means that they can never ever write
any more changes to their eMMC -- it's a one-time fuse -- and perhaps
further not realizing that this may make their expensive cell phone
become a brick of some sort, depending on how much the bootloader or
OS depends on having r/w access.
I don't even know that I'd want to make such an option available via a
boot argument, since boot arguments are often misunderstood. As Andrei
says, it doesn't sound like something a regular user (as opposed to an
OEM) should ever have reason to do. I'd rather leave it to specialized
manufacturing equipment.
Does that make sense? Thanks,
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
^ permalink raw reply
* From: Bank of China (BOC) here in China!
From: Ray Chang @ 2011-10-22 16:53 UTC (permalink / raw)
Hello, I am Ray Chang, of the Bank of China (BOC) here in China, contacting you today, with regards to an investment made with our bank four years ago, by a business man from your country. Generic heir search produced your details. If i can present you as relation, contact me by my private electronic mail only; raychang-cG17fTKFUrW8rjiVs5Nzzw@public.gmane.org
Ray Chang
^ permalink raw reply
* LVM2 ./WHATS_NEW lib/log/log.c
From: zkabelac @ 2011-10-22 16:52 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-10-22 16:52:01
Modified files:
. : WHATS_NEW
lib/log : log.c
Log message:
Reduce stack size usage in print_log
As the buf2[] and locn[] can't be used at the same time, safe 1 page from
stack memory.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.2167&r2=1.2168
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/log/log.c.diff?cvsroot=lvm2&r1=1.65&r2=1.66
--- LVM2/WHATS_NEW 2011/10/22 16:42:10 1.2167
+++ LVM2/WHATS_NEW 2011/10/22 16:52:00 1.2168
@@ -1,5 +1,6 @@
Version 2.02.89 -
==================================
+ Remove extra 4kB buffer allocated on stack in print_log().
Make move_lv_segment non-static function and use dm_list function.
Pass exclusive LV locks to all nodes in the cluster.
Improve lvcreate man documentation of the chunksize option.
--- LVM2/lib/log/log.c 2011/08/11 19:21:42 1.65
+++ LVM2/lib/log/log.c 2011/10/22 16:52:00 1.66
@@ -185,7 +185,7 @@
const char *format, ...)
{
va_list ap;
- char buf[1024], buf2[4096], locn[4096];
+ char buf[1024], locn[4096];
int bufused, n;
const char *message;
const char *trformat; /* Translated format string */
@@ -221,7 +221,7 @@
(_store_errmsg && (level <= _LOG_ERR)) ||
log_once) {
va_start(ap, format);
- n = vsnprintf(buf2, sizeof(buf2) - 1, trformat, ap);
+ n = vsnprintf(locn, sizeof(locn) - 1, trformat, ap);
va_end(ap);
if (n < 0) {
@@ -230,8 +230,8 @@
goto log_it;
}
- buf2[sizeof(buf2) - 1] = '\0';
- message = &buf2[0];
+ locn[sizeof(locn) - 1] = '\0';
+ message = &locn[0];
}
/* FIXME Avoid pointless use of message buffer when it'll never be read! */
^ permalink raw reply
* Re: [patch net-next V2] net: introduce ethernet teaming device
From: Eric Dumazet @ 2011-10-22 16:51 UTC (permalink / raw)
To: Jiri Pirko
Cc: netdev, davem, bhutchings, shemminger, fubar, andy, tgraf,
ebiederm, mirqus, kaber, greearb, jesse, fbl, benjamin.poirier,
jzupka
In-Reply-To: <20111022151346.GA2028@minipsycho.orion>
Le samedi 22 octobre 2011 à 17:13 +0200, Jiri Pirko a écrit :
> >> +
> >> +/************************
> >> + * Rx path frame handler
> >> + ************************/
> >> +
> >> +/* note: already called with rcu_read_lock */
> >> +static rx_handler_result_t team_handle_frame(struct sk_buff **pskb)
> >> +{
> >> + struct sk_buff *skb = *pskb;
> >> + struct team_port *port;
> >> + struct team *team;
> >> + rx_handler_result_t res = RX_HANDLER_ANOTHER;
> >> +
> >> + skb = skb_share_check(skb, GFP_ATOMIC);
> >> + if (!skb)
> >> + return RX_HANDLER_CONSUMED;
> >> +
> >> + *pskb = skb;
> >> +
> >> + port = team_port_get_rcu(skb->dev);
> >> + team = port->team;
> >> +
> >> + if (team->mode_ops.receive)
> >
> >Hmm, you need ACCESS_ONCE() here or rcu_dereference()
> >
> >See commit 4d97480b1806e883eb (bonding: use local function pointer of
> >bond->recv_probe in bond_handle_frame) for reference
>
> I do not think so. Because mode_ops.receive changes only from
> __team_change_mode() and this can be called only in case no ports are in
> team. And team_port_del() calls synchronize_rcu().
>
We are used to code following this template :
if (ops->handler)
ops->handler(arguments);
But this is valid only because ops points to constant memory.
In your case, we really see its not true, dont try to pretend its safe.
^ permalink raw reply
* Re: Bug in io_u buf calculaiton.
From: Jens Axboe @ 2011-10-22 16:51 UTC (permalink / raw)
To: Jagadish Kumar; +Cc: fio
In-Reply-To: <CAHwYU7uw-Jg5wkZ_NTpyT1cFgAe0G2pYQaUOjef3Bx_0sXb2YA@mail.gmail.com>
On 2011-10-21 07:49, Jagadish Kumar wrote:
> Hello,
> following are the details of the bug in fio.
>
> This bug in fio can show up as corruption of data when performing verify.
>
> Description:
> ----------------
>
> if the product of block size and queudepth is greater than 4GB, io_u
> buffer will not
> be assigned properly due to overflow.
>
> fio --bsrange=256k-4m --ioengine=libaio --iodepth=2064 --direct=1
> --name=job3 --offset=2GB --size=14GB --rw=write
> --verify_pattern=0xdeadbeef --filename=/dev/sdb
>
> can show false corruption.
>
> Version:
> -----------
> 1.58
>
> Explanation:
> -----------------
>
> in a loop fio tries to assign the data buffer to each i/o request.
>
>
> static int init_io_u(struct thread_data *td)
> {
> struct io_u *io_u;
> unsigned int max_bs;
> int cl_align, i, max_units;
> char *p;
> ...
> p = td->orig_buffer;
> ...
> for (i = 0; i < max_units; i++) {
> ...
> io_u->buf = p + max_bs * i;
> }
> }
>
> at max_bs=4M i=1024, the integer overflows and the addresses are being
> used again.
> i,e i/o request 1024 will have the same data buffer as that of i/o request 0.
>
> This is seen from fio debug log.
>
> mem 11164 io_u alloc 0x219f530, index 0
> mem 11164 io_u 0x219f530, mem 0x7f09bb62d000
> mem 11164 io_u alloc 0x219f820, index 1
> mem 11164 io_u 0x219f820, mem 0x7f09bba2d000
>
>
> mem 11164 io_u alloc 0x225b530, index 1024
> mem 11164 io_u 0x225b530, mem 0x7f09bb62d000
> mem 11164 io_u alloc 0x225b820, index 1025
> mem 11164 io_u 0x225b820, mem 0x7f09bba2d000
>
> the fix is as follows:
>
> io_u->buf = p + (unsigned long long)max_bs * i;
Thanks, excellent bug report! I committed this fix:
http://git.kernel.dk/?p=fio.git;a=commitdiff;h=cf00f975d506d20ad5f02ee9dd8fec17af74bb2f
since it's a little simpler and avoids the overflow as well. Patch has
gone into stable-1.x and master branches.
--
Jens Axboe
^ permalink raw reply
* Re: [patch 5/5] elf: Add support for loading ET_CKPT files
From: Dan Merillat @ 2011-10-22 16:49 UTC (permalink / raw)
To: Tejun Heo
Cc: Cyrill Gorcunov, linux-kernel, Andrew Vagin, Pavel Emelyanov,
James Bottomley, Glauber Costa, H. Peter Anvin, Ingo Molnar,
Dave Hansen, Eric W. Biederman, Daniel Lezcano, Alexey Dobriyan,
Linus Torvalds, Oleg Nesterov
In-Reply-To: <20111014171033.GC4294@google.com>
On Fri, Oct 14, 2011 at 1:10 PM, Tejun Heo <tj@kernel.org> wrote:
> I don't think this is a good idea. We already have most of interface
> necessary for restoring task state and there's no need to put it into
> the kernel as one piece. If there's something which can't be done
> from userland using existing interfaces, let's please discuss what
> they are and whether they can be resolved differently first.
I may be missing something, but programs do care about their and their
children's PIDs, and even with a kernel interface to pick a specific
PID for a new process (yikes!) it wouldn't work if the original PID
was in use by another process.
Open file handles that point to files that have been changed/deleted
while the process was frozen, unlinked scratch files that are gone for
good when the original process dies, shared memory, processes at the
other end of pipes, etc. Graphical programs get even worse, with
trying to reproduce the X11 state or GPU state. Network isn't as
bad, as it's expected that it could be dropped at any time so most
programs can handle it.
If the userspace to be checkpointed can cope with all that, it can
handle moving the vdso mapping. Since it has to have specific logic
to handle all the different types of , why not just have it dump
internal state on a signal and rerun with that file as an argument?
The target process that can deal with being externally frozen would
seem to be basically a tech demo.
^ permalink raw reply
* LVM2/lib/metadata lv_manip.c
From: zkabelac @ 2011-10-22 16:48 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-10-22 16:48:59
Modified files:
lib/metadata : lv_manip.c
Log message:
Remove old thin code from _lv_insert_empty_sublvs
Since thin is not able to use _lv_insert_empty_sublvs,
remove its appearence from this function.
Start to use extend_pool() function for desired functionality
and modify lv_extend() for this.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/metadata/lv_manip.c.diff?cvsroot=lvm2&r1=1.302&r2=1.303
--- LVM2/lib/metadata/lv_manip.c 2011/10/22 16:46:34 1.302
+++ LVM2/lib/metadata/lv_manip.c 2011/10/22 16:48:59 1.303
@@ -2369,9 +2369,6 @@
lv->status |= MIRRORED;
sub_lv_status = MIRROR_IMAGE;
layer_name = "mimage";
- } else if (segtype_is_thin_pool(segtype)) {
- lv->status |= THIN_POOL;
- layer_name = "tpool";
} else
return_0;
@@ -2406,19 +2403,13 @@
lv->alloc, lv->vg)))
return_0;
- if (segtype_is_thin_pool(segtype)) {
- if (!attach_pool_data_lv(mapseg, sub_lv))
- return_0;
- } else if (!set_lv_segment_area_lv(mapseg, i, sub_lv, 0, sub_lv_status))
+ if (!set_lv_segment_area_lv(mapseg, i, sub_lv, 0, sub_lv_status))
return_0;
- /* Metadata LVs for raid or thin pool */
+ /* Metadata LVs for raid */
if (segtype_is_raid(segtype)) {
if (dm_snprintf(img_name, len, "%s_rmeta_%u", lv->name, i) < 0)
return_0;
- } else if (segtype_is_thin_pool(segtype)) {
- if (dm_snprintf(img_name, len, "%s_tmeta", lv->name) < 0)
- return_0;
} else
continue;
@@ -2428,12 +2419,10 @@
lv->alloc, lv->vg)))
return_0;
- if (segtype_is_thin_pool(segtype)) {
- if (!attach_pool_metadata_lv(mapseg, sub_lv))
- return_0;
- } else if (!set_lv_segment_area_lv(mapseg, i, sub_lv, 0, RAID_META))
+ if (!set_lv_segment_area_lv(mapseg, i, sub_lv, 0, RAID_META))
return_0;
}
+
dm_list_add(&lv->segments, &mapseg->list);
return 1;
@@ -2562,29 +2551,15 @@
struct alloc_handle *ah;
uint32_t sub_lv_count;
- /*
- * For RAID, all the devices are AREA_LV.
- * However, for 'mirror on stripe' using non-RAID targets,
- * the mirror legs are AREA_LV while the stripes underneath
- * are AREA_PV.
- */
- if (segtype_is_raid(segtype))
- sub_lv_count = mirrors * stripes + segtype->parity_devs;
- else if (segtype_is_thin_pool(segtype))
- sub_lv_count = 1;
- else
- sub_lv_count = mirrors;
-
log_very_verbose("Extending segment type, %s", segtype->name);
if (segtype_is_virtual(segtype))
return lv_add_virtual_segment(lv, 0u, extents, segtype, thin_pool_name);
- if (segtype_is_raid(segtype) && !lv->le_count)
- log_count = mirrors * stripes;
-
if (segtype_is_thin_pool(segtype))
log_count = 1;
+ else if (segtype_is_raid(segtype) && !lv->le_count)
+ log_count = mirrors * stripes;
/* Thin pool allocation treats its metadata device like a mirror log. */
if (!(ah = allocate_extents(lv->vg, lv, segtype, stripes, mirrors,
@@ -2592,10 +2567,24 @@
allocatable_pvs, alloc, NULL)))
return_0;
- if (!segtype_is_mirrored(segtype) && !segtype_is_raid(segtype) && !segtype_is_thin_pool(segtype))
+ if (segtype_is_thin_pool(segtype)) {
+ if (!(r = extend_pool(lv, segtype, ah)))
+ stack;
+ } else if (!segtype_is_mirrored(segtype) && !segtype_is_raid(segtype))
r = lv_add_segment(ah, 0, ah->area_count, lv, segtype,
stripe_size, 0u, 0);
else {
+ /*
+ * For RAID, all the devices are AREA_LV.
+ * However, for 'mirror on stripe' using non-RAID targets,
+ * the mirror legs are AREA_LV while the stripes underneath
+ * are AREA_PV.
+ */
+ if (segtype_is_raid(segtype))
+ sub_lv_count = mirrors * stripes + segtype->parity_devs;
+ else
+ sub_lv_count = mirrors;
+
if (!lv->le_count &&
!_lv_insert_empty_sublvs(lv, segtype, stripe_size,
region_size, sub_lv_count)) {
@@ -4202,34 +4191,12 @@
init_dmeventd_monitor(lp->activation_monitoring);
- if (seg_is_thin_pool(lp)) {
- /* FIXME: skipping in test mode is not going work */
- if (!activate_lv_excl(cmd, first_seg(lv)->pool_metadata_lv) ||
- /* Clear 4KB of metadata device for new thin-pool. */
- // FIXME: maybe -zero n should allow to recreate same thin pool
- // and different option should be used for zero_new_blocks
- !set_lv(cmd, first_seg(lv)->pool_metadata_lv, UINT64_C(0), 0)) {
- log_error("Aborting. Failed to wipe pool metadata %s.",
- lv->name);
- goto revert_new_lv;
- }
- /* FIXME: we may postpone finish of the pool creation to the
- * moment of the first activation - but this needs more changes
- * so we would update metadata with vgchange -ay
- *
- * For now always activate.
- */
+ if (seg_is_thin_pool(lp) || seg_is_thin(lp)) {
if (!activate_lv_excl(cmd, lv)) {
- log_error("Aborting. Could not to activate thin pool %s.",
+ log_error("Aborting. Failed to activate thin %s.",
lv->name);
goto revert_new_lv;
}
- } else if (seg_is_thin(lp)) {
- /* FIXME: same as with thin pool - add lazy creation support */
- if (!activate_lv_excl(cmd, lv)) {
- log_error("Aborting. Failed to activate thin %s.", lv->name);
- goto revert_new_lv;
- }
} else if (lp->snapshot) {
if (!activate_lv_excl(cmd, lv)) {
log_error("Aborting. Failed to activate snapshot "
^ permalink raw reply
* LVM2/tools vgchange.c
From: zkabelac @ 2011-10-22 16:47 UTC (permalink / raw)
To: lvm-devel
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2011-10-22 16:47:23
Modified files:
tools : vgchange.c
Log message:
Ensure thin LVs take an exclusive activation
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/tools/vgchange.c.diff?cvsroot=lvm2&r1=1.123&r2=1.124
--- LVM2/tools/vgchange.c 2011/09/14 18:20:04 1.123
+++ LVM2/tools/vgchange.c 2011/10/22 16:47:23 1.124
@@ -145,7 +145,10 @@
stack;
continue;
}
- } else if (lv_is_origin(lv) || (activate == CHANGE_AE)) {
+ } else if (lv_is_origin(lv) ||
+ lv_is_thin_pool(lv) ||
+ lv_is_thin_volume(lv) ||
+ (activate == CHANGE_AE)) {
if (!activate_lv_excl(cmd, lv)) {
stack;
continue;
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.