Displaying 20 results from an estimated 204 matches for "block_size".
2023 Mar 29
1
ChaCha20 Rekey Frequency
...I can't just change the block size because it breaks compatibility. I
can do something like as a hack (though it would probably be better to
do it with the compat function):
if (strstr(enc->name, "chacha"))
*max_blocks = (u_int64_t)1 << (16*2);
else if (enc->block_size >= 16)
*max_blocks = (u_int64_t)1 << (enc->block_size*2);
else
*max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
if (state->rekey_limit)
to force it to reduce the rekey rate but I'm deeply unsure of what
impact that would have on the security of the cipher as...
2023 Mar 29
2
ChaCha20 Rekey Frequency
...block size because it breaks compatibility. I can do
> something like as a hack (though it would probably be better to do it with the
> compat function):
>
> if (strstr(enc->name, "chacha"))
> *max_blocks = (u_int64_t)1 << (16*2);
> else if (enc->block_size >= 16)
> *max_blocks = (u_int64_t)1 << (enc->block_size*2);
> else
> *max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
> if (state->rekey_limit)
>
> to force it to reduce the rekey rate but I'm deeply unsure of what impact that
> would hav...
2023 Mar 29
1
[EXTERNAL] Re: ChaCha20 Rekey Frequency
...t change the block size because it breaks compatibility. I can do
> something like as a hack (though it would probably be better to do it with the
> compat function):
>
> if (strstr(enc->name, "chacha"))
> *max_blocks = (u_int64_t)1 << (16*2);
> else if (enc->block_size >= 16)
> *max_blocks = (u_int64_t)1 << (enc->block_size*2);
> else
> *max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
> if (state->rekey_limit)
>
> to force it to reduce the rekey rate but I'm deeply unsure of what impact that
> would have on th...
2023 Mar 29
1
[EXTERNAL] Re: ChaCha20 Rekey Frequency
...s compatibility. I can
> do
> > something like as a hack (though it would probably be better to do it with
> the
> > compat function):
> >
> > if (strstr(enc->name, "chacha"))
> > *max_blocks = (u_int64_t)1 << (16*2);
> > else if (enc->block_size >= 16)
> > *max_blocks = (u_int64_t)1 << (enc->block_size*2);
> > else
> > *max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
> > if (state->rekey_limit)
> >
> > to force it to reduce the rekey rate but I'm deeply unsure of what imp...
2018 Jun 21
2
NVPTX - Reordering load instructions
...rk compiled with
NVCC vs NVPTX (coming from Julia, not CUDA C) and I'm seeing a
significant difference due to PTX instruction ordering. The relevant
source code consists of two nested loops that get fully unrolled, doing
some basic arithmetic with values loaded from shared memory:
> #define BLOCK_SIZE 16
>
> __shared__ float dia[BLOCK_SIZE][BLOCK_SIZE];
> __shared__ float peri_col[BLOCK_SIZE][BLOCK_SIZE];
>
> int idx = threadIdx.x - BLOCK_SIZE;
> for (int i = 0; i < BLOCK_SIZE; i++) {
> for (int j = 0; j < i; j++)
> peri_col[idx][i] -= peri_col[idx][j] * dia[j...
2009 Dec 27
3
[PATCH 1/2] drm/nv50: align size of buffer object to the right boundaries.
...uffer objects.
+ * align to to that as well as the page size. Align the size to the
+ * appropriate boundaries. This does imply that sizes are rounded up
+ * 3-7 pages, so make sure your "special" buffer sizes are large enough.
*/
if (dev_priv->card_type == NV_50) {
uint32_t block_size = nouveau_mem_fb_amount(dev) >> 15;
@@ -77,22 +78,20 @@ nouveau_bo_fixup_align(struct drm_device *dev,
case 0x2800:
case 0x4800:
case 0x7a00:
- *size = roundup(*size, block_size);
if (is_power_of_2(block_size)) {
- *size += 3 * block_size;
for (i = 1; i < 10; i++) {...
2023 Mar 29
1
[EXTERNAL] Re: ChaCha20 Rekey Frequency
...s compatibility. I can
> do
> > something like as a hack (though it would probably be better to do it with
> the
> > compat function):
> >
> > if (strstr(enc->name, "chacha"))
> > *max_blocks = (u_int64_t)1 << (16*2);
> > else if (enc->block_size >= 16)
> > *max_blocks = (u_int64_t)1 << (enc->block_size*2);
> > else
> > *max_blocks = ((u_int64_t)1 << 30) / enc->block_size;
> > if (state->rekey_limit)
> >
> > to force it to reduce the rekey rate but I'm deeply unsure of what imp...
2009 Jul 01
0
Unix Extensions + ext3 quotas + df
...ase SMB_QUERY_POSIX_FS_INFO:
{
int rc;
vfs_statvfs_struct svfs;
if (!lp_unix_extensions()) {
return ERROR_NT(NT_STATUS_INVALID_LEVEL);
}
rc = SMB_VFS_STATVFS(conn, ".", &svfs);
if (!rc) {
+
+ {
+ SMB_BIG_UINT dfree,dsize,bsize,block_size,sectors_per_unit,bytes_per_sector;
+
+ if (get_dfree_info(conn,".",False,&bsize,&dfree,&dsize) != (SMB_BIG_UINT)-1) {
+ block_size = lp_block_size(snum);
+ if (bsize < block_size) {
+ SMB_BIG_UINT factor = block_size/bsize;
+ bsize = block_si...
2003 Mar 30
1
[RFC][patch] dynamic rolling block and sum sizes II
...k load of just sending checksums. array_size is the
memory footprint sums array which could compounded by the
sum hash could be a limiting factor on the size file a given
machine can reasonably handle.
The second table shows the effect of --block-size=16384
and is indicative of what setting a MAX_BLOCK_SIZE would do.
file length block_len block_count s2length xmit sums array_size
50 700 1 2 6 36
831K 920 926 2 5556 32K
1439K 1208 1221 2 7326...
2015 Oct 20
0
[PATCHv3 2/2] Include resize2fs_P into vfs_min_size.
...- a/daemon/ext2.c
+++ b/daemon/ext2.c
@@ -29,6 +29,7 @@
#include "daemon.h"
#include "c-ctype.h"
#include "actions.h"
+#include "xstrtol.h"
#define MAX_ARGS 128
@@ -279,15 +280,41 @@ do_resize2fs_M (const char *device)
return 0;
}
+static long
+get_block_size (const char *device)
+{
+ CLEANUP_FREE_STRING_LIST char **params = NULL;
+ const char *block_pattern = "Block size";
+ size_t i;
+ long block_size;
+
+ params = do_tune2fs_l (device);
+ if (params == NULL)
+ return -1;
+
+ for (i = 0; params[i] != NULL; i += 2) {
+ if (STREQ...
2015 Oct 19
1
Re: [PATCH 2/2] Include resize2fs_P into vfs_min_size.
...g (const char *device, const char *tag);
> diff --git a/daemon/ext2.c b/daemon/ext2.c
> index 0cd6a66..f00e081 100644
> --- a/daemon/ext2.c
> +++ b/daemon/ext2.c
> @@ -279,8 +279,34 @@ do_resize2fs_M (const char *device)
> return 0;
> }
>
> +static int32_t
> +get_block_size (const char *device)
> +{
> + CLEANUP_FREE_STRING_LIST char **params = NULL;
> + const char *block_pattern = "Block size";
> + size_t i;
> + int32_t block_size;
> +
> + params = do_tune2fs_l (device);
This works, yes, although maybe there should be a way to run...
2003 Mar 23
1
[RFC] dynamic checksum size
...@@ -109,13 +109,21 @@
/*
- send a header that says "we have no checksums" down the f_out fd
+ * NULL sum_struct means we have no checksums
*/
-static void send_null_sums(int f_out)
+
+void write_sum_head(int f, struct sum_struct *sum)
{
- write_int(f_out, 0);
- write_int(f_out, block_size);
- write_int(f_out, 0);
+ static struct sum_struct null_sum;
+
+ if (sum == (struct sum_struct *)NULL)
+ sum = &null_sum;
+
+ write_int(f, sum->count);
+ write_int(f, sum->blength);
+ if (remote_version >= 27)
+ write_int(f, sum->s2length);
+ write_int(f, sum->remainder);
}...
2018 Jun 21
2
NVPTX - Reordering load instructions
...a, not CUDA C) and I'm seeing a
> > significant difference due to PTX instruction ordering. The relevant
> > source code consists of two nested loops that get fully unrolled, doing
> > some basic arithmetic with values loaded from shared memory:
> >
> >> #define BLOCK_SIZE 16
> >>
> >> __shared__ float dia[BLOCK_SIZE][BLOCK_SIZE];
> >> __shared__ float peri_col[BLOCK_SIZE][BLOCK_SIZE];
> >>
> >> int idx = threadIdx.x - BLOCK_SIZE;
> >> for (int i = 0; i < BLOCK_SIZE; i++) {
> >> for (int j = 0; j <...
2006 Feb 05
1
Add swap support to fstype, second version
...*
* MINIX, ext3 and Reiserfs bits are currently untested.
*/
@@ -20,6 +20,7 @@
#include <endian.h>
#include <netinet/in.h>
#include <sys/vfs.h>
+#include <asm/page.h>
#define cpu_to_be32(x) __cpu_to_be32(x) /* Needed by romfs_fs.h */
@@ -49,6 +50,9 @@
#define BLOCK_SIZE 1024
+/* Swap needs the definition of block size */
+#include "swap_fs.h"
+
static int gzip_image(const unsigned char *buf, unsigned long long *bytes)
{
if (buf[0] == 037 && (buf[1] == 0213 || buf[1] == 0236)) {
@@ -182,6 +186,19 @@
return 0;
}
+static int swap_image(co...
2015 Oct 16
0
[PATCH 2/2] Include resize2fs_P into get_min_size.
.../*-- in blkid.c --*/
extern char *get_blkid_tag (const char *device, const char *tag);
diff --git a/daemon/ext2.c b/daemon/ext2.c
index 0cd6a66..fcf39de 100644
--- a/daemon/ext2.c
+++ b/daemon/ext2.c
@@ -279,8 +279,31 @@ do_resize2fs_M (const char *device)
return 0;
}
+static int32_t
+get_block_size (const char *device)
+{
+ CLEANUP_FREE_STRING_LIST char **params = NULL;
+ const char *block_pattern = "Block size";
+ size_t i;
+ int32_t block_size;
+
+ params = do_tune2fs_l (device);
+ if (params == NULL)
+ return -1;
+
+ for (i = 0; params[i] != NULL; i += 2) {
+ if ((!s...
2015 Oct 19
0
[PATCH 2/2] Include resize2fs_P into vfs_min_size.
.../*-- in blkid.c --*/
extern char *get_blkid_tag (const char *device, const char *tag);
diff --git a/daemon/ext2.c b/daemon/ext2.c
index 0cd6a66..f00e081 100644
--- a/daemon/ext2.c
+++ b/daemon/ext2.c
@@ -279,8 +279,34 @@ do_resize2fs_M (const char *device)
return 0;
}
+static int32_t
+get_block_size (const char *device)
+{
+ CLEANUP_FREE_STRING_LIST char **params = NULL;
+ const char *block_pattern = "Block size";
+ size_t i;
+ int32_t block_size;
+
+ params = do_tune2fs_l (device);
+ if (params == NULL)
+ return -1;
+
+ for (i = 0; params[i] != NULL; i += 2) {
+ if ((!s...
2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...+172,52 @@ static int virtblk_add_req(struct virtqueue *vq, struct virtblk_req *vbr,
return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC);
}
+static inline int virtblk_setup_discard(struct request *req)
+{
+ unsigned short segments = blk_rq_nr_discard_segments(req), n = 0;
+ u32 block_size = queue_logical_block_size(req->q);
+ struct virtio_blk_discard *range;
+ struct bio *bio;
+
+ if (block_size < 512 || !block_size)
+ return -1;
+
+ range = kmalloc_array(segments, sizeof(*range), GFP_ATOMIC);
+ if (!range)
+ return -1;
+
+ __rq_for_each_bio(bio, req) {
+ u64 slba = (bio-&...
2017 Jul 05
3
[PATCH v2] virtio-blk: add DISCARD support to virtio-blk driver
...+172,52 @@ static int virtblk_add_req(struct virtqueue *vq, struct virtblk_req *vbr,
return virtqueue_add_sgs(vq, sgs, num_out, num_in, vbr, GFP_ATOMIC);
}
+static inline int virtblk_setup_discard(struct request *req)
+{
+ unsigned short segments = blk_rq_nr_discard_segments(req), n = 0;
+ u32 block_size = queue_logical_block_size(req->q);
+ struct virtio_blk_discard *range;
+ struct bio *bio;
+
+ if (block_size < 512 || !block_size)
+ return -1;
+
+ range = kmalloc_array(segments, sizeof(*range), GFP_ATOMIC);
+ if (!range)
+ return -1;
+
+ __rq_for_each_bio(bio, req) {
+ u64 slba = (bio-&...
2010 Feb 02
2
[PATCH 1/6] drm/nv50: align size of buffer object to the right boundaries.
...+ * align to to that as well as the page size. Align the size to the
+ * appropriate boundaries. This does imply that sizes are rounded up
+ * 3-7 pages, so be aware of this and do not waste memory by allocating
+ * many small buffers.
*/
if (dev_priv->card_type == NV_50) {
uint32_t block_size = nouveau_mem_fb_amount(dev) >> 15;
@@ -77,22 +79,20 @@ nouveau_bo_fixup_align(struct drm_device *dev,
case 0x2800:
case 0x4800:
case 0x7a00:
- *size = roundup(*size, block_size);
if (is_power_of_2(block_size)) {
- *size += 3 * block_size;
for (i = 1; i < 10; i++) {...
2008 Feb 01
2
How to read group descriptor?
...get the group descriptor. Here is my
code. Please check out what is missing.
#include<linux/ext3_fs.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<stdio.h>
#include<unistd.h>
#include<fcntl.h>
#include<stdlib.h>
#include<string.h>
#define block_size 4096
#define boot_block_size 1024
int main()
{
char *buff = (char *)malloc(block_size);
struct ext3_super_block * sblock = (struct ext3_super_block
*)malloc(sizeof(struct ext3_super_block));
struct ext3_group_desc * gdesc = (struct ext3_group_desc
*)malloc(sizeof(struct ext3_group_desc));...