Skip to content

Commit 0989dfa

Browse files
Christoph Hellwigcmaiolino
authored andcommitted
xfs: move xfs_submit_zoned_bio a bit
Commit f3e2e53 ("xfs: add inode to zone caching for data placement") add the new code right between xfs_submit_zoned_bio and xfs_zone_alloc_and_submit which implement the main zoned write path. Move xfs_submit_zoned_bio down to keep it together again. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Carlos Maiolino <[email protected]> Reviewed-by: Hans Holmberg <[email protected]> Signed-off-by: Carlos Maiolino <[email protected]>
1 parent df3b7e2 commit 0989dfa

File tree

1 file changed

+20
-20
lines changed

1 file changed

+20
-20
lines changed

fs/xfs/xfs_zone_alloc.c

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -777,26 +777,6 @@ xfs_mark_rtg_boundary(
777777
ioend->io_flags |= IOMAP_IOEND_BOUNDARY;
778778
}
779779

780-
static void
781-
xfs_submit_zoned_bio(
782-
struct iomap_ioend *ioend,
783-
struct xfs_open_zone *oz,
784-
bool is_seq)
785-
{
786-
ioend->io_bio.bi_iter.bi_sector = ioend->io_sector;
787-
ioend->io_private = oz;
788-
atomic_inc(&oz->oz_ref); /* for xfs_zoned_end_io */
789-
790-
if (is_seq) {
791-
ioend->io_bio.bi_opf &= ~REQ_OP_WRITE;
792-
ioend->io_bio.bi_opf |= REQ_OP_ZONE_APPEND;
793-
} else {
794-
xfs_mark_rtg_boundary(ioend);
795-
}
796-
797-
submit_bio(&ioend->io_bio);
798-
}
799-
800780
/*
801781
* Cache the last zone written to for an inode so that it is considered first
802782
* for subsequent writes.
@@ -891,6 +871,26 @@ xfs_zone_cache_create_association(
891871
xfs_mru_cache_insert(mp->m_zone_cache, ip->i_ino, &item->mru);
892872
}
893873

874+
static void
875+
xfs_submit_zoned_bio(
876+
struct iomap_ioend *ioend,
877+
struct xfs_open_zone *oz,
878+
bool is_seq)
879+
{
880+
ioend->io_bio.bi_iter.bi_sector = ioend->io_sector;
881+
ioend->io_private = oz;
882+
atomic_inc(&oz->oz_ref); /* for xfs_zoned_end_io */
883+
884+
if (is_seq) {
885+
ioend->io_bio.bi_opf &= ~REQ_OP_WRITE;
886+
ioend->io_bio.bi_opf |= REQ_OP_ZONE_APPEND;
887+
} else {
888+
xfs_mark_rtg_boundary(ioend);
889+
}
890+
891+
submit_bio(&ioend->io_bio);
892+
}
893+
894894
void
895895
xfs_zone_alloc_and_submit(
896896
struct iomap_ioend *ioend,

0 commit comments

Comments
 (0)