similar to: [PATCH] fs: fs2fs: Replaced calls to kmalloc and memcpy with kmemdup

Displaying 20 results from an estimated 300 matches similar to: "[PATCH] fs: fs2fs: Replaced calls to kmalloc and memcpy with kmemdup"

2009 Mar 31
0
[PATCH] ocfs2: remove some pointless conditionals before kfree()
Remove some pointless conditionals before kfree(). Signed-off-by: Wei Yongjun <yjwei at cn.fujitsu.com> --- fs/ocfs2/alloc.c | 3 +-- fs/ocfs2/cluster/heartbeat.c | 6 ++---- fs/ocfs2/cluster/tcp.c | 6 ++---- fs/ocfs2/dlm/dlmdomain.c | 3 +-- fs/ocfs2/dlm/dlmrecovery.c | 6 ++---- fs/ocfs2/extent_map.c | 3 +-- fs/ocfs2/journal.c
2013 Nov 22
0
[PATCH Resend] ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
From: Zongxun Wang <wangzongxun at huawei.com> Even if using the same jbd2 handle, we cannot rollback a transaction. So once some error occurs after successfully allocating clusters, the allocated clusters will never be used and it means they are lost. For example, call ocfs2_claim_clusters successfully when expanding a file, but failed in ocfs2_insert_extent. So we need free the allocated
2013 Nov 21
1
[PATCH] ocfs2: free allocated clusters if error occurs after ocfs2_claim_clusters
From: Zongxun Wang <wangzongxun at huawei.com> Even if using the same jbd2 handle, we cannot rollback a transaction. So once some error occurs after successfully allocating clusters, the allocated clusters will never be used and it means they are lost. For example, call ocfs2_claim_clusters successfully when expanding a file, but failed in ocfs2_insert_extent. So we need free the allocated
2013 Nov 25
0
[PATCH] ocfs2: correctly update i_used in ocfs2_free_local_alloc_bits
This patch is based on ocfs2-free-allocated-clusters-if-error-occurs- after-ocfs2_claim_clusters.patch. https://oss.oracle.com/pipermail/ocfs2-devel/2013-November/009461.html We should note down num of bits to be freed, so as to update i_used correspondingly after clearing those bits in bitmap. Signed-off-by: Joseph Qi <joseph.qi at huawei.com> --- fs/ocfs2/localalloc.c | 4 +++- 1 file
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
2010 Mar 12
1
[PATCH] ocfs2: Always try for maximum bits with new local alloc windows
What we were doing before was to ask for the current window size as the maximum allocation. This had the effect of limiting the amount of allocation we could get for the local alloc during times when the window size was shrunk due to fragmentation. In some cases, that could actually *increase* fragmentation by artificially limiting the number of bits we can accept. So while we still want to ask
2016 Dec 28
0
[PATCH] net: Use kmemdup instead of kmalloc and memcpy
From: Shyam Saini <mayhs11saini at gmail.com> Date: Sat, 24 Dec 2016 00:44:58 +0530 > when some other buffer is immediately copied into allocated region. > Replace calls to kmalloc followed by a memcpy with a direct > call to kmemdup. > > Signed-off-by: Shyam Saini <mayhs11saini at gmail.com> Applied.
2016 Dec 23
1
[PATCH] net: Use kmemdup instead of kmalloc and memcpy
when some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini <mayhs11saini at gmail.com> --- drivers/net/virtio_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ba1aa24..dde4bc4 100644 ---
2016 Dec 23
1
[PATCH] net: Use kmemdup instead of kmalloc and memcpy
when some other buffer is immediately copied into allocated region. Replace calls to kmalloc followed by a memcpy with a direct call to kmemdup. Signed-off-by: Shyam Saini <mayhs11saini at gmail.com> --- drivers/net/virtio_net.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ba1aa24..dde4bc4 100644 ---
2013 Mar 11
2
[PATCH] block: replace kmalloc and then memcpy with kmemdup
Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb at gmail.com> --- drivers/block/xen-blkfront.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index c3dae2e..9620644 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1203,11 +1203,10 @@ static int blkif_recover(struct
2013 Mar 11
2
[PATCH] block: replace kmalloc and then memcpy with kmemdup
Signed-off-by: Mihnea Dobrescu-Balaur <mihneadb at gmail.com> --- drivers/block/xen-blkfront.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/block/xen-blkfront.c b/drivers/block/xen-blkfront.c index c3dae2e..9620644 100644 --- a/drivers/block/xen-blkfront.c +++ b/drivers/block/xen-blkfront.c @@ -1203,11 +1203,10 @@ static int blkif_recover(struct
2023 Apr 30
3
[PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
fstest generic cases 347 361 628 629 trigger a same issue: When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal. This commit gives ocfs2 ability to handle jbd2 ABORT case. Signed-off-by: Heming Zhao <heming.zhao at suse.com> --- fs/ocfs2/alloc.c | 10 ++++++---- fs/ocfs2/journal.c | 5 +++++ fs/ocfs2/localalloc.c | 3 +++ 3 files changed, 14
2020 Apr 21
1
[PATCH -next] drm/nouveau/acr: Use kmemdup instead of kmalloc and memcpy
Fixes coccicheck warning: drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c:103:23-30: WARNING opportunity for kmemdup drivers/gpu/drm/nouveau/nvkm/subdev/acr/hsfw.c:113:22-29: WARNING opportunity for kmemdup Fixes: 22dcda45a3d1 ("drm/nouveau/acr: implement new subdev to replace "secure boot"") Reported-by: Hulk Robot <hulkci at huawei.com> Signed-off-by: Zou Wei
2010 Jun 09
3
[PATCH] ocfs2: Limit default local alloc size within bitmap range.
In commit 6b82021b9e91cd689fdffadbcdb9a42597bbe764, we increase our local alloc size and calculate how much megabytes we can get according to group size and volume size. But we also need to check the maximum bits a local alloc block bitmap can have. With a bs=512, cs=32K, local volume with 160G, it calculate 96MB while the maximum local alloc size is only 76M. So the bitmap will overflow and
2023 Apr 30
2
[PATCH 1/2] ocfs2: fix missing reset j_num_trans for sync
fstest generic cases 266 272 281 trigger hanging issue when umount. I use 266 to describe the root cause. ``` 49 _dmerror_unmount 50 _dmerror_mount 51 52 echo "Compare files" 53 md5sum $testdir/file1 | _filter_scratch 54 md5sum $testdir/file2 | _filter_scratch 55 56 echo "CoW and unmount" 57 sync 58 _dmerror_load_error_table 59 urk=$($XFS_IO_PROG -f -c "pwrite
2009 Feb 13
44
[PATCH 0/40] ocfs2: Detach ocfs2 metadata I/O from struct inode
The following series of patches attempts to detach metadata I/O from struct inode. They are currently tied together pretty tightly. Metadata reads happen via the ocfs2_read_blocks() functions, writes via both jbd2 and ocfs2_write_blocks(). - Each inode has a cache of associated metadata blocks stored on its ip_metadata_cache member. The ocfs2_read/write_blocks() functions take a struct
2009 Jan 06
1
[PATCH] ocfs2: Add statistics for the checksum and ecc operations.
It would be nice to know how often we get checksum failures. Even better, how many of them we can fix with the single bit ecc. So, we add a statistics structure. The structure can be installed into debugfs wherever the user wants. For ocfs2, we'll put it in the superblock-specific debugfs directory and pass it down from our higher-level functions. The stats are only registered with
2009 Apr 15
1
hang with fsdlm
Using fsdlm/ocfs2_controld.cman, I've rerun the test I've been having problems with on 2.6.30-rc1. After running for several minutes in the same directory on three nodes, the test hangs, and I collect the following information: bull-01 ------- 3053 S< [ocfs2dc] ocfs2_downconvert_thread 3054 S< [dlm_astd] dlm_astd 3055 S< [dlm_scand]
2006 Aug 15
0
[git patches] ocfs2 updates
This set of patches includes a few dlm related fixes from Kurt, and a small, trivial cleanup by Adrian. Also included are three disk allocation patches by me - two fixes and one incremental improvement in our allocation strategy. These have been around since early June, so I think they've had enough testing that they can go upstream. Please pull from 'upstream-linus' branch of
2023 Apr 06
3
[PATCH] ocfs2: Fix wrong search logic in __ocfs2_resv_find_window
** problem ** Current code triggers a defragfs bug [1]: ``` tw-tst:~ # defragfs.ocfs2 /mnt/test_from_dd1 defragfs.ocfs2 1.8.7 [ERROR]Move extent failed:"/mnt/test_from_dd1" - No space left on device [ERROR]"/mnt/test_from_dd1":No space left on device ``` I added some debug messages in relevant functions. When above error messages appeared, the la-window still had enough