search for: max_buff

Displaying 15 results from an estimated 15 matches for "max_buff".

Did you mean: max_buffs
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;...
2004 Jun 20
2
[PATCH] fixup journal-related ifdef mess
...rite_access(handle, bh) +#define journal_get_undo_access(handle, bh, credits) \ + journal_get_undo_access(handle, bh) #endif @@ -165,7 +173,7 @@ down_read(&osb->journal->trans_barrier); /* actually start the transaction now */ - retval->k_handle = ocfs_journal_start(journal, max_buffs); + retval->k_handle = journal_start(journal, max_buffs); if (IS_ERR(retval->k_handle)) { up_read(&osb->journal->trans_barrier); @@ -411,7 +419,7 @@ /* actually stop the transaction. if we've set h_sync, * it'll have been commited when we return */ - retval =...
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_buffer...
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 command...
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
...module initialization */ void ocfs2_set_locking_protocol(void); #endif /* DLMGLUE_H */ diff --git a/fs/ocfs2/journal.c b/fs/ocfs2/journal.c index bf34c49..45c5bfe 100644 --- a/fs/ocfs2/journal.c +++ b/fs/ocfs2/journal.c @@ -355,6 +355,7 @@ handle_t *ocfs2_start_trans(struct ocfs2_super *osb, int max_buffs) if (ocfs2_is_hard_readonly(osb)) return ERR_PTR(-EROFS); + vfs_check_frozen(osb->sb, SB_FREEZE_TRANS); BUG_ON(osb->journal->j_state == OCFS2_JOURNAL_FREE); BUG_ON(max_buffs <= 0); diff --git a/fs/ocfs2/ocfs2.h b/fs/ocfs2/ocfs2.h index bf66978..3077822 100644 --- a/fs/ocfs...
2013 Apr 12
0
net rpc share allowedusers fails half the time?
...: union srvsvc_NetShareCtr(case 1) ctr1 : * ctr1: struct srvsvc_NetShareCtr1 count : 0x00000000 (0) array : NULL max_buffer : 0xffffffff (4294967295) resume_handle : * resume_handle : 0x00000000 (0) &r: struct ncacn_packet rpc_vers : 0x05 (5) rpc_vers_minor : 0x00 (0) ptype : DC...
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
...: union srvsvc_NetShareCtr(case 1) ctr1 : * ctr1: struct srvsvc_NetShareCtr1 count : 0x00000000 (0) array : NULL max_buffer : 0xffffffff (4294967295) resume_handle : * resume_handle : 0x00000000 (0) &r: struct ncacn_packet rpc_vers : 0x05 (5) rpc_vers_minor : 0x00 (0) ptype : DC...
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 --