Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'xfs-fixes-6.19-rc6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux

Pull xfs fixes from Carlos Maiolino:
"Just a few obvious fixes and some 'cosmetic' changes"

* tag 'xfs-fixes-6.19-rc6' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux:
xfs: set max_agbno to allow sparse alloc of last full inode chunk
xfs: Fix xfs_grow_last_rtg()
xfs: improve the assert at the top of xfs_log_cover
xfs: fix an overly long line in xfs_rtgroup_calc_geometry
xfs: mark __xfs_rtgroup_extents static
xfs: Fix the return value of xfs_rtcopy_summary()
xfs: fix memory leak in xfs_growfs_check_rtgeom()

+41 -39
+6 -5
fs/xfs/libxfs/xfs_ialloc.c
··· 848 848 * invalid inode records, such as records that start at agbno 0 849 849 * or extend beyond the AG. 850 850 * 851 - * Set min agbno to the first aligned, non-zero agbno and max to 852 - * the last aligned agbno that is at least one full chunk from 853 - * the end of the AG. 851 + * Set min agbno to the first chunk aligned, non-zero agbno and 852 + * max to one less than the last chunk aligned agbno from the 853 + * end of the AG. We subtract 1 from max so that the cluster 854 + * allocation alignment takes over and allows allocation within 855 + * the last full inode chunk in the AG. 854 856 */ 855 857 args.min_agbno = args.mp->m_sb.sb_inoalignmt; 856 858 args.max_agbno = round_down(xfs_ag_block_count(args.mp, 857 859 pag_agno(pag)), 858 - args.mp->m_sb.sb_inoalignmt) - 859 - igeo->ialloc_blks; 860 + args.mp->m_sb.sb_inoalignmt) - 1; 860 861 861 862 error = xfs_alloc_vextent_near_bno(&args, 862 863 xfs_agbno_to_fsb(pag,
+27 -26
fs/xfs/libxfs/xfs_rtgroup.c
··· 48 48 return 0; 49 49 } 50 50 51 + /* Compute the number of rt extents in this realtime group. */ 52 + static xfs_rtxnum_t 53 + __xfs_rtgroup_extents( 54 + struct xfs_mount *mp, 55 + xfs_rgnumber_t rgno, 56 + xfs_rgnumber_t rgcount, 57 + xfs_rtbxlen_t rextents) 58 + { 59 + ASSERT(rgno < rgcount); 60 + if (rgno == rgcount - 1) 61 + return rextents - ((xfs_rtxnum_t)rgno * mp->m_sb.sb_rgextents); 62 + 63 + ASSERT(xfs_has_rtgroups(mp)); 64 + return mp->m_sb.sb_rgextents; 65 + } 66 + 67 + xfs_rtxnum_t 68 + xfs_rtgroup_extents( 69 + struct xfs_mount *mp, 70 + xfs_rgnumber_t rgno) 71 + { 72 + return __xfs_rtgroup_extents(mp, rgno, mp->m_sb.sb_rgcount, 73 + mp->m_sb.sb_rextents); 74 + } 75 + 51 76 /* Precompute this group's geometry */ 52 77 void 53 78 xfs_rtgroup_calc_geometry( ··· 83 58 xfs_rtbxlen_t rextents) 84 59 { 85 60 rtg->rtg_extents = __xfs_rtgroup_extents(mp, rgno, rgcount, rextents); 86 - rtg_group(rtg)->xg_block_count = rtg->rtg_extents * mp->m_sb.sb_rextsize; 61 + rtg_group(rtg)->xg_block_count = 62 + rtg->rtg_extents * mp->m_sb.sb_rextsize; 87 63 rtg_group(rtg)->xg_min_gbno = xfs_rtgroup_min_block(mp, rgno); 88 64 } 89 65 ··· 160 134 out_unwind_new_rtgs: 161 135 xfs_free_rtgroups(mp, first_rgno, index); 162 136 return error; 163 - } 164 - 165 - /* Compute the number of rt extents in this realtime group. */ 166 - xfs_rtxnum_t 167 - __xfs_rtgroup_extents( 168 - struct xfs_mount *mp, 169 - xfs_rgnumber_t rgno, 170 - xfs_rgnumber_t rgcount, 171 - xfs_rtbxlen_t rextents) 172 - { 173 - ASSERT(rgno < rgcount); 174 - if (rgno == rgcount - 1) 175 - return rextents - ((xfs_rtxnum_t)rgno * mp->m_sb.sb_rgextents); 176 - 177 - ASSERT(xfs_has_rtgroups(mp)); 178 - return mp->m_sb.sb_rgextents; 179 - } 180 - 181 - xfs_rtxnum_t 182 - xfs_rtgroup_extents( 183 - struct xfs_mount *mp, 184 - xfs_rgnumber_t rgno) 185 - { 186 - return __xfs_rtgroup_extents(mp, rgno, mp->m_sb.sb_rgcount, 187 - mp->m_sb.sb_rextents); 188 137 } 189 138 190 139 /*
-2
fs/xfs/libxfs/xfs_rtgroup.h
··· 285 285 int xfs_initialize_rtgroups(struct xfs_mount *mp, xfs_rgnumber_t first_rgno, 286 286 xfs_rgnumber_t end_rgno, xfs_rtbxlen_t rextents); 287 287 288 - xfs_rtxnum_t __xfs_rtgroup_extents(struct xfs_mount *mp, xfs_rgnumber_t rgno, 289 - xfs_rgnumber_t rgcount, xfs_rtbxlen_t rextents); 290 288 xfs_rtxnum_t xfs_rtgroup_extents(struct xfs_mount *mp, xfs_rgnumber_t rgno); 291 289 void xfs_rtgroup_calc_geometry(struct xfs_mount *mp, struct xfs_rtgroup *rtg, 292 290 xfs_rgnumber_t rgno, xfs_rgnumber_t rgcount,
+5 -3
fs/xfs/xfs_log.c
··· 1180 1180 int error = 0; 1181 1181 bool need_covered; 1182 1182 1183 - ASSERT((xlog_cil_empty(mp->m_log) && xlog_iclogs_empty(mp->m_log) && 1184 - !xfs_ail_min_lsn(mp->m_log->l_ailp)) || 1185 - xlog_is_shutdown(mp->m_log)); 1183 + if (!xlog_is_shutdown(mp->m_log)) { 1184 + ASSERT(xlog_cil_empty(mp->m_log)); 1185 + ASSERT(xlog_iclogs_empty(mp->m_log)); 1186 + ASSERT(!xfs_ail_min_lsn(mp->m_log->l_ailp)); 1187 + } 1186 1188 1187 1189 if (!xfs_log_writable(mp)) 1188 1190 return 0;
+3 -3
fs/xfs/xfs_rtalloc.c
··· 126 126 error = 0; 127 127 out: 128 128 xfs_rtbuf_cache_relse(oargs); 129 - return 0; 129 + return error; 130 130 } 131 131 /* 132 132 * Mark an extent specified by start and len allocated. ··· 1265 1265 uint32_t rem; 1266 1266 1267 1267 if (rextsize != 1) 1268 - return -EINVAL; 1268 + goto out_inval; 1269 1269 div_u64_rem(nmp->m_sb.sb_rblocks, gblocks, &rem); 1270 1270 if (rem) { 1271 1271 xfs_warn(mp, ··· 1326 1326 return true; 1327 1327 if (mp->m_sb.sb_rgcount == 0) 1328 1328 return false; 1329 - return xfs_rtgroup_extents(mp, mp->m_sb.sb_rgcount - 1) <= 1329 + return xfs_rtgroup_extents(mp, mp->m_sb.sb_rgcount - 1) < 1330 1330 mp->m_sb.sb_rgextents; 1331 1331 } 1332 1332