[LU-16856] LU-14729 broke a grants for the fallocate files. Created: 30/May/23 Updated: 30/May/23 |
|
| Status: | Open |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Critical |
| Reporter: | Alexey Lyashkov | Assignee: | WC Triage |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
commit 9810341a839c27b7a53cdc047e0395f8f906c4bf (refs/changes/94/43994/4) + /* + * Convert unwritten extent might need split extents, could + * not skip it. + */ + if (osd_is_mapped(dt, lnb[i].lnb_file_offset, &mapped) && + !(mapped.flags & FIEMAP_EXTENT_UNWRITTEN)) { lnb[i].lnb_flags |= OBD_BRW_MAPPED; continue; } It caused an fallocated extents counted as new write extents for grants, but space is already allocated and grants should don't used for this case. It caused a write lost in case OST is full and grants can't be provided as first check will return false.
for (i = 0; i < npages; i++) {
if (lnb[i].lnb_rc == -ENOSPC &&
(lnb[i].lnb_flags & OBD_BRW_MAPPED)) {
/* Allow the write to proceed if overwriting an
* existing block
*/
lnb[i].lnb_rc = 0;
}
if (lnb[i].lnb_rc) { /* ENOSPC, network RPC error, etc. */
CDEBUG(D_INODE, "Skipping [%d] == %d\n", i,
lnb[i].lnb_rc);
LASSERT(lnb[i].lnb_page);
generic_error_remove_page(inode->i_mapping,
lnb[i].lnb_page);
continue;
}
|