Displaying 15 results from an estimated 15 matches for "max_buffers".
2019 Jul 30
0
[PATCH libnbd] examples: Fix theoretical cookie race in example.
...@ static gboolean
read_data (gpointer user_data)
{
static uint64_t posn = 0;
- const size_t i = nr_buffers;
+ size_t i;
if (gssrc == NULL)
return FALSE;
@@ -367,16 +361,21 @@ read_data (gpointer user_data)
return FALSE;
}
+ /* Find a free buffer. */
+ for (i = 0; i < MAX_BUFFERS; ++i)
+ if (buffers[i].state == BUFFER_UNUSED)
+ goto found;
+
/* If too many read requests are in flight, return FALSE so this
* idle callback is unregistered. It will be registered by the
* write callback when nr_buffers decreases.
*/
- if (nr_buffers >= MAX_BUFFERS) {...
2019 Jul 15
2
[PATCH libnbd] examples: Include an example of integrating with the glibc main loop.
** NOT WORKING **
This patch shows how to integrate libnbd and the glib main loop.
Posted mainly as a point of discussion as it doesn't quite work yet.
Rich.
2008 Sep 15
1
Jitter Buffer issues
...nds the latest packet.
Currently it finds the most resent packet in the timing buffer not the
oldest packet. The oldest packet is found once the timing buffer is
reset and only one frame is in the tb[0].
int latest = 32767;
/* Pick latest amoung all sub-windows */
for (j=0;j<MAX_BUFFERS;j++)
{
if (pos[j] < tb[j].filled && tb[j].timing[pos[j]] < latest)
{
next = j;
latest = tb[j].timing[pos[j]];
}
}
I think it should be
int latest = 0;
/* Pick latest among all sub-windows */
for (j=0;j&l...
2004 Jun 20
2
[PATCH] fixup journal-related ifdef mess
always use the 2.6 variants and fix up for 2.4 under the hood
Index: src/journal.c
===================================================================
--- src/journal.c (revision 1156)
+++ src/journal.c (working copy)
@@ -105,9 +105,17 @@
return status;
}
-#else
-#define ocfs_journal_start journal_start
-#define ocfs_journal_stop journal_stop
+
+#define journal_start(journal, nblocks) \
+
2019 Jul 17
1
Re: [PATCH libnbd] examples: Include an example of integrating with the glib main loop.
..., "memory", "size=1G", NULL
> +};
Do you want --exit-with-parent?
> +
> +/* The list of buffers waiting to be written. Note that the source
> + * server can answer requests out of order so these buffers may not be
> + * sorted by offset.
> + */
> +#define MAX_BUFFERS 16
> +#define BUFFER_SIZE 65536
> +
> +enum buffer_state {
> + BUFFER_READING,
> + BUFFER_READ_COMPLETED,
> + BUFFER_WRITING,
> +};
> +
> +struct buffer {
> + uint64_t offset;
> + int64_t cookie;
> + enum buffer_state state;
> + char *data;
> +};
>...
2019 Jul 15
0
[PATCH libnbd] examples: Include an example of integrating with the glib main loop.
...tic const char *dest_args[] = {
+ "nbdkit", "-s", "memory", "size=1G", NULL
+};
+
+/* The list of buffers waiting to be written. Note that the source
+ * server can answer requests out of order so these buffers may not be
+ * sorted by offset.
+ */
+#define MAX_BUFFERS 16
+#define BUFFER_SIZE 65536
+
+enum buffer_state {
+ BUFFER_READING,
+ BUFFER_READ_COMPLETED,
+ BUFFER_WRITING,
+};
+
+struct buffer {
+ uint64_t offset;
+ int64_t cookie;
+ enum buffer_state state;
+ char *data;
+};
+
+static struct buffer buffers[MAX_BUFFERS];
+static size_t nr_buffers;...
2019 Jul 17
0
[PATCH libnbd v2] examples: Include an example of integrating with the glib main loop.
...+ "nbdkit", "-s", "--exit-with-parent", "memory", "size=1G", NULL
+};
+
+/* The list of buffers waiting to be written. Note that the source
+ * server can answer requests out of order so these buffers may not be
+ * sorted by offset.
+ */
+#define MAX_BUFFERS 16
+#define BUFFER_SIZE 65536
+
+enum buffer_state {
+ BUFFER_READING,
+ BUFFER_READ_COMPLETED,
+ BUFFER_WRITING,
+};
+
+struct buffer {
+ uint64_t offset;
+ /* Note that command cookies are only unique per libnbd handle.
+ * Since we have two handles but we must look up completed commands
+...
2019 Jul 30
4
[PATCH libnbd] examples: Fix theoretical cookie race in example.
Previously discussed here:
https://www.redhat.com/archives/libguestfs/2019-July/msg00213.html
It turns out that deferring callbacks is a PITA. (It would be a bit
easier if C has closures.) However by rewriting the example we can
avoid the need to use the cookie at all and make it run a bit more
efficiently, so let's do that instead.
Rich.
2019 Jul 17
2
[PATCH libnbd v2] examples: Include an example of integrating with glib main loop.
This is working now, and incorporates all of the changes in Eric's
review, *except* that it still doesn't retire commands (although this
seems to make no obvious difference, except possibly a performance and
memory impact).
Rich.
2010 Jan 29
0
[PATCH 3/3] ocfs2:freeze-thaw: make it work -v2
This patch adds freeze_fs()/unfreeze_fs() for ocfs2 so that it supports freeze/thaw.
Signed-off-by: Wengang Wang <wen.gang.wang at oracle.com>
---
fs/ocfs2/dlmglue.c | 115 ++++++++++++++++++++++++++++++++++++++++++++++-
fs/ocfs2/dlmglue.h | 2 +
fs/ocfs2/journal.c | 1 +
fs/ocfs2/ocfs2.h | 12 +++++
fs/ocfs2/super.c | 129 +++++++++++++++++++++++++++++++++++++++++++++++++++-
2013 Apr 12
0
net rpc share allowedusers fails half the time?
Hi all,
[Please CC me in reply, I'm not subscribed]
We have a weird situation on one of our shares, net rpc share
allowedusers fails with NT_STATUS_IO_DEVICE_ERROR. Normally the command
is run with the password passed on the command-line. If we manually type
the password or turn up the debug level, it works. If we turn up the
debug output but direct the output to /dev/null or to a file, then
2008 Sep 04
4
[PATCH 0/3] ocfs2: Switch over to JBD2.
ocfs2 currently uses the Journaled Block Device (JBD) for its
journaling. This is a very stable and tested codebase. However, JBD
is limited by architecture to 32bit block numbers. This means an ocfs2
filesystem is limited to 2^32 blocks. With a 4K blocksize, that's 16TB.
People want larger volumes.
Fortunately, there is now JBD2. JBD2 adds 64bit block number support
and some other
2018 Apr 17
0
slow smbclient samba 4.7.x
Hi all,
I have found this:
time smbclient -L //debian -U%
Sharename Type Comment
--------- ---- -------
print$ Disk Printer Drivers
software Disk
IPC$ IPC IPC Service (Samba 4.7.7-Debian)
HP_F4100 Printer HP Deskjet F4100 series
MX870-series Printer Canon MX870 series
l6p Printer l6p
MX435
2008 Dec 22
56
[git patches] Ocfs2 patches for merge window, batch 2/3
Hi,
This is the second batch of Ocfs2 patches intended for the merge window. The
1st batch were sent out previously:
http://lkml.org/lkml/2008/12/19/280
The bulk of this set is comprised of Jan Kara's patches to add quota support
to Ocfs2. Many of the quota patches are to generic code, which I carried to
make merging of the Ocfs2 support easier. All of the non-ocfs2 patches
should have
2012 Nov 05
7
VFS ACL with SMB2
Hello,
I have a question because POSIX ACL with SMB2 max protocol does not work
properly.Did you test VFS xattr acls with SMB2 max protocol? Is it
working corectly?
Best regards/Adrian Berlin
--