Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
filesystems
lustre_2_15
0021-LU-15726-osd-ldiskfs-Increase-journal-cred...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0021-LU-15726-osd-ldiskfs-Increase-journal-credits-reserv.patch of Package lustre_2_15
From 1c9cf22b23440213bcfe6b3db9be9fe5a41a48a6 Mon Sep 17 00:00:00 2001 From: Shaun Tancheff <shaun.tancheff@hpe.com> Date: Sat, 23 Jul 2022 10:07:19 +0700 Subject: [PATCH 21/30] LU-15726 osd-ldiskfs: Increase journal credits reservation Increase journal credits by 1 level Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com> Change-Id: I1ccb9dab8331f3ca0186b28b51745e1cd52d7ad3 --- lustre/osd-ldiskfs/osd_io.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lustre/osd-ldiskfs/osd_io.c b/lustre/osd-ldiskfs/osd_io.c index 444b24ff9cf0..a3d0c8b04895 100644 --- a/lustre/osd-ldiskfs/osd_io.c +++ b/lustre/osd-ldiskfs/osd_io.c @@ -1887,8 +1887,8 @@ int osd_calc_bkmap_credits(struct super_block *sb, struct inode *inode, * so let's shrink it to 2 levels (4GB files) */ - /* this is default reservation: 2 levels */ - credits = (blocks + 2) * 3; + /* this is default reservation: 3 levels */ + credits = (blocks + 3) * 3; /* actual offset is unknown, hard to optimize */ if (pos == -1) @@ -1900,20 +1900,20 @@ int osd_calc_bkmap_credits(struct super_block *sb, struct inode *inode, credits = blocks; /* allocate if not allocated */ if (inode == NULL) { - credits += blocks * 2; + credits += blocks * 3; return credits; } for (i = (pos >> bits); i < (pos >> bits) + blocks; i++) { LASSERT(i < LDISKFS_NDIR_BLOCKS); if (LDISKFS_I(inode)->i_data[i] == 0) - credits += 2; + credits += 3; } } else if (pos + size <= (LDISKFS_NDIR_BLOCKS + 1024) * bs) { /* single indirect */ - credits = blocks * 3; + credits = blocks * 4; if (inode == NULL || LDISKFS_I(inode)->i_data[LDISKFS_IND_BLOCK] == 0) - credits += 3; + credits += 4; else /* The indirect block may be modified. */ credits += 1; @@ -1989,7 +1989,7 @@ static ssize_t osd_declare_write(const struct lu_env *env, struct dt_object *dt, if (_pos != -1) credits += depth; /* blocks to store data: bitmap,gd,itself */ - credits += blocks * 3; + credits += blocks * 4; } else { credits = osd_calc_bkmap_credits(sb, inode, size, _pos, blocks); } -- 2.38.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor