Skip to content

Commit a43a490

Browse files
committed
[GFS2] Fix bz 234168 (ignoring rgrp flags)
Ths following patch makes GFS2 use the rgrp flags properly. Although there are also separate flags for both data and metadata as well, I've not implemented these as there seems little use for them. On the otherhand, the "noalloc" flag is generally useful for future changes we might which to make, so this ensures that we interpret it correctly. In addition I fixed the comment above the function which was incorrect. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
1 parent ce03f12 commit a43a490

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎fs/gfs2/rgrp.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -698,8 +698,6 @@ struct gfs2_alloc *gfs2_alloc_get(struct gfs2_inode *ip)
698698
* @al: the struct gfs2_alloc structure describing the reservation
699699
*
700700
* If there's room for the requested blocks to be allocated from the RG:
701-
* Sets the $al_reserved_data field in @al.
702-
* Sets the $al_reserved_meta field in @al.
703701
* Sets the $al_rgd field in @al.
704702
*
705703
* Returns: 1 on success (it fits), 0 on failure (it doesn't fit)
@@ -710,6 +708,9 @@ static int try_rgrp_fit(struct gfs2_rgrpd *rgd, struct gfs2_alloc *al)
710708
struct gfs2_sbd *sdp = rgd->rd_sbd;
711709
int ret = 0;
712710

711+
if (rgd->rd_rg.rg_flags & GFS2_RGF_NOALLOC)
712+
return 0;
713+
713714
spin_lock(&sdp->sd_rindex_spin);
714715
if (rgd->rd_free_clone >= al->al_requested) {
715716
al->al_rgd = rgd;

0 commit comments

Comments
 (0)