소스 검색

f2fs: fix the location of tracepoint

We need to get a trace before submit_bio, since its bi_sector is remapped during
the submit_bio.

Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Jaegeuk Kim 11 년 전
부모
커밋
76130ccabc
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      fs/f2fs/data.c

+ 2 - 2
fs/f2fs/data.c

@@ -104,11 +104,12 @@ static void __submit_merged_bio(struct f2fs_bio_info *io)
 	rw = fio->rw | fio->rw_flag;
 	rw = fio->rw | fio->rw_flag;
 
 
 	if (is_read_io(rw)) {
 	if (is_read_io(rw)) {
-		submit_bio(rw, io->bio);
 		trace_f2fs_submit_read_bio(io->sbi->sb, rw, fio->type, io->bio);
 		trace_f2fs_submit_read_bio(io->sbi->sb, rw, fio->type, io->bio);
+		submit_bio(rw, io->bio);
 		io->bio = NULL;
 		io->bio = NULL;
 		return;
 		return;
 	}
 	}
+	trace_f2fs_submit_write_bio(io->sbi->sb, rw, fio->type, io->bio);
 
 
 	/*
 	/*
 	 * META_FLUSH is only from the checkpoint procedure, and we should wait
 	 * META_FLUSH is only from the checkpoint procedure, and we should wait
@@ -122,7 +123,6 @@ static void __submit_merged_bio(struct f2fs_bio_info *io)
 	} else {
 	} else {
 		submit_bio(rw, io->bio);
 		submit_bio(rw, io->bio);
 	}
 	}
-	trace_f2fs_submit_write_bio(io->sbi->sb, rw, fio->type, io->bio);
 	io->bio = NULL;
 	io->bio = NULL;
 }
 }