Skip to content

Commit 1c0a9c2

Browse files
ukernelidryomov
authored andcommitted
ceph: include snapc in debug message of write
Signed-off-by: "Yan, Zheng" <[email protected]> Signed-off-by: Ilya Dryomov <[email protected]>
1 parent 24d063a commit 1c0a9c2

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

fs/ceph/addr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,8 +569,8 @@ static int writepage_nounlock(struct page *page, struct writeback_control *wbc)
569569
if (snap_size < page_off + len)
570570
len = snap_size - page_off;
571571

572-
dout("writepage %p page %p index %lu on %llu~%u snapc %p\n",
573-
inode, page, page->index, page_off, len, snapc);
572+
dout("writepage %p page %p index %lu on %llu~%u snapc %p seq %lld\n",
573+
inode, page, page->index, page_off, len, snapc, snapc->seq);
574574

575575
writeback_stat = atomic_long_inc_return(&fsc->writeback_count);
576576
if (writeback_stat >

fs/ceph/file.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -562,8 +562,7 @@ static ssize_t ceph_sync_read(struct kiocb *iocb, struct iov_iter *to,
562562
ssize_t ret;
563563
size_t len = iov_iter_count(to);
564564

565-
dout("sync_read on file %p %llu~%u %s\n", file, off,
566-
(unsigned)len,
565+
dout("sync_read on file %p %llu~%u %s\n", file, off, (unsigned)len,
567566
(file->f_flags & O_DIRECT) ? "O_DIRECT" : "");
568567

569568
if (!len)
@@ -846,8 +845,9 @@ ceph_direct_read_write(struct kiocb *iocb, struct iov_iter *iter,
846845
if (write && ceph_snap(file_inode(file)) != CEPH_NOSNAP)
847846
return -EROFS;
848847

849-
dout("sync_direct_read_write (%s) on file %p %lld~%u\n",
850-
(write ? "write" : "read"), file, pos, (unsigned)count);
848+
dout("sync_direct_%s on file %p %lld~%u snapc %p seq %lld\n",
849+
(write ? "write" : "read"), file, pos, (unsigned)count,
850+
snapc, snapc->seq);
851851

852852
ret = filemap_write_and_wait_range(inode->i_mapping, pos, pos + count);
853853
if (ret < 0)
@@ -1050,7 +1050,8 @@ ceph_sync_write(struct kiocb *iocb, struct iov_iter *from, loff_t pos,
10501050
if (ceph_snap(file_inode(file)) != CEPH_NOSNAP)
10511051
return -EROFS;
10521052

1053-
dout("sync_write on file %p %lld~%u\n", file, pos, (unsigned)count);
1053+
dout("sync_write on file %p %lld~%u snapc %p seq %lld\n",
1054+
file, pos, (unsigned)count, snapc, snapc->seq);
10541055

10551056
ret = filemap_write_and_wait_range(inode->i_mapping, pos, pos + count);
10561057
if (ret < 0)

0 commit comments

Comments
 (0)