* [infiniband-diags] [1/3] make libibnetdisc default behavior to overwrite a cache
@ 2010-04-19 18:43 Al Chu
[not found] ` <1271702587.17987.212.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Al Chu @ 2010-04-19 18:43 UTC (permalink / raw)
To: Sasha Khapyorsky; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
[-- Attachment #1: Type: text/plain, Size: 287 bytes --]
Hey Sasha,
As discussed in a previous thread, this patch makes the default caching
behavior in libibnetdisc to overwrite a previous cache.
Al
--
Albert Chu
chu11-i2BcT+NCU+M@public.gmane.org
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
[-- Attachment #2: 0001-make-libibnetdisc-default-behavior-to-overwrite-a-ca.patch --]
[-- Type: message/rfc822, Size: 1143 bytes --]
From: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>
Subject: [PATCH] make libibnetdisc default behavior to overwrite a cache
Date: Mon, 19 Apr 2010 10:52:14 -0700
Message-ID: <1271702059.17987.211.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>
Signed-off-by: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>
---
.../libibnetdisc/src/ibnetdisc_cache.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c b/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c
index 5acb8f6..e05ce99 100644
--- a/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c
+++ b/infiniband-diags/libibnetdisc/src/ibnetdisc_cache.c
@@ -889,8 +889,11 @@ int ibnd_cache_fabric(ibnd_fabric_t * fabric, const char *file,
}
if (!stat(file, &statbuf)) {
- IBND_DEBUG("file '%s' already exists\n", file);
- return -1;
+ if (unlink(file) < 0) {
+ IBND_DEBUG("error removing '%s': %s\n",
+ file, strerror(errno));
+ return -1;
+ }
}
if ((fd = open(file, O_CREAT | O_EXCL | O_WRONLY, 0644)) < 0) {
--
1.5.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [infiniband-diags] [1/3] make libibnetdisc default behavior to overwrite a cache
[not found] ` <1271702587.17987.212.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>
@ 2010-06-14 11:34 ` Sasha Khapyorsky
0 siblings, 0 replies; 2+ messages in thread
From: Sasha Khapyorsky @ 2010-06-14 11:34 UTC (permalink / raw)
To: Al Chu; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA
On 11:43 Mon 19 Apr , Al Chu wrote:
> Hey Sasha,
>
> As discussed in a previous thread, this patch makes the default caching
> behavior in libibnetdisc to overwrite a previous cache.
>
> Al
>
> --
> Albert Chu
> chu11-i2BcT+NCU+M@public.gmane.org
> Computer Scientist
> High Performance Systems Division
> Lawrence Livermore National Laboratory
> Date: Mon, 19 Apr 2010 10:52:14 -0700
> From: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>
> Subject: [PATCH] make libibnetdisc default behavior to overwrite a cache
> Message-Id: <1271702059.17987.211.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>
> Mime-Version: 1.0
> Content-Transfer-Encoding: 7bit
>
>
> Signed-off-by: Albert Chu <chu11-i2BcT+NCU+M@public.gmane.org>
All three applied.
Sasha
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-06-14 11:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-19 18:43 [infiniband-diags] [1/3] make libibnetdisc default behavior to overwrite a cache Al Chu
[not found] ` <1271702587.17987.212.camel-X2zTWyBD0EhliZ7u+bvwcg@public.gmane.org>
2010-06-14 11:34 ` Sasha Khapyorsky
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.