@@ -816,11 +816,8 @@ static int send_cmd(struct send_ctx *sctx)
816816static int send_rename (struct send_ctx * sctx ,
817817 struct fs_path * from , struct fs_path * to )
818818{
819- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
820819 int ret ;
821820
822- btrfs_debug (fs_info , "send_rename %s -> %s" , from -> start , to -> start );
823-
824821 ret = begin_cmd (sctx , BTRFS_SEND_C_RENAME );
825822 if (ret < 0 )
826823 return ret ;
@@ -840,11 +837,8 @@ static int send_rename(struct send_ctx *sctx,
840837static int send_link (struct send_ctx * sctx ,
841838 struct fs_path * path , struct fs_path * lnk )
842839{
843- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
844840 int ret ;
845841
846- btrfs_debug (fs_info , "send_link %s -> %s" , path -> start , lnk -> start );
847-
848842 ret = begin_cmd (sctx , BTRFS_SEND_C_LINK );
849843 if (ret < 0 )
850844 return ret ;
@@ -863,11 +857,8 @@ static int send_link(struct send_ctx *sctx,
863857 */
864858static int send_unlink (struct send_ctx * sctx , struct fs_path * path )
865859{
866- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
867860 int ret ;
868861
869- btrfs_debug (fs_info , "send_unlink %s" , path -> start );
870-
871862 ret = begin_cmd (sctx , BTRFS_SEND_C_UNLINK );
872863 if (ret < 0 )
873864 return ret ;
@@ -885,11 +876,8 @@ static int send_unlink(struct send_ctx *sctx, struct fs_path *path)
885876 */
886877static int send_rmdir (struct send_ctx * sctx , struct fs_path * path )
887878{
888- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
889879 int ret ;
890880
891- btrfs_debug (fs_info , "send_rmdir %s" , path -> start );
892-
893881 ret = begin_cmd (sctx , BTRFS_SEND_C_RMDIR );
894882 if (ret < 0 )
895883 return ret ;
@@ -1573,7 +1561,6 @@ static int find_extent_clone(struct send_ctx *sctx,
15731561 struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
15741562 int ret ;
15751563 int extent_type ;
1576- u64 logical ;
15771564 u64 disk_byte ;
15781565 u64 num_bytes ;
15791566 struct btrfs_file_extent_item * fi ;
@@ -1604,7 +1591,6 @@ static int find_extent_clone(struct send_ctx *sctx,
16041591
16051592 compressed = btrfs_file_extent_compression (eb , fi );
16061593 num_bytes = btrfs_file_extent_num_bytes (eb , fi );
1607- logical = disk_byte + btrfs_file_extent_offset (eb , fi );
16081594
16091595 /*
16101596 * Setup the clone roots.
@@ -1686,14 +1672,8 @@ static int find_extent_clone(struct send_ctx *sctx,
16861672 }
16871673 up_read (& fs_info -> commit_root_sem );
16881674
1689- btrfs_debug (fs_info ,
1690- "find_extent_clone: data_offset=%llu, ino=%llu, num_bytes=%llu, logical=%llu" ,
1691- data_offset , ino , num_bytes , logical );
1692-
1693- if (!backref_ctx .found ) {
1694- btrfs_debug (fs_info , "no clones found" );
1675+ if (!backref_ctx .found )
16951676 return - ENOENT ;
1696- }
16971677
16981678 cur_clone_root = NULL ;
16991679 for (i = 0 ; i < sctx -> clone_roots_cnt ; i ++ ) {
@@ -2631,12 +2611,9 @@ static void free_path_for_command(const struct send_ctx *sctx, struct fs_path *p
26312611
26322612static int send_truncate (struct send_ctx * sctx , u64 ino , u64 gen , u64 size )
26332613{
2634- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
26352614 int ret = 0 ;
26362615 struct fs_path * p ;
26372616
2638- btrfs_debug (fs_info , "send_truncate %llu size=%llu" , ino , size );
2639-
26402617 p = get_path_for_command (sctx , ino , gen );
26412618 if (IS_ERR (p ))
26422619 return PTR_ERR (p );
@@ -2658,12 +2635,9 @@ static int send_truncate(struct send_ctx *sctx, u64 ino, u64 gen, u64 size)
26582635
26592636static int send_chmod (struct send_ctx * sctx , u64 ino , u64 gen , u64 mode )
26602637{
2661- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
26622638 int ret = 0 ;
26632639 struct fs_path * p ;
26642640
2665- btrfs_debug (fs_info , "send_chmod %llu mode=%llu" , ino , mode );
2666-
26672641 p = get_path_for_command (sctx , ino , gen );
26682642 if (IS_ERR (p ))
26692643 return PTR_ERR (p );
@@ -2685,15 +2659,12 @@ static int send_chmod(struct send_ctx *sctx, u64 ino, u64 gen, u64 mode)
26852659
26862660static int send_fileattr (struct send_ctx * sctx , u64 ino , u64 gen , u64 fileattr )
26872661{
2688- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
26892662 int ret = 0 ;
26902663 struct fs_path * p ;
26912664
26922665 if (sctx -> proto < 2 )
26932666 return 0 ;
26942667
2695- btrfs_debug (fs_info , "send_fileattr %llu fileattr=%llu" , ino , fileattr );
2696-
26972668 p = get_path_for_command (sctx , ino , gen );
26982669 if (IS_ERR (p ))
26992670 return PTR_ERR (p );
@@ -2715,13 +2686,9 @@ static int send_fileattr(struct send_ctx *sctx, u64 ino, u64 gen, u64 fileattr)
27152686
27162687static int send_chown (struct send_ctx * sctx , u64 ino , u64 gen , u64 uid , u64 gid )
27172688{
2718- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
27192689 int ret = 0 ;
27202690 struct fs_path * p ;
27212691
2722- btrfs_debug (fs_info , "send_chown %llu uid=%llu, gid=%llu" ,
2723- ino , uid , gid );
2724-
27252692 p = get_path_for_command (sctx , ino , gen );
27262693 if (IS_ERR (p ))
27272694 return PTR_ERR (p );
@@ -2744,7 +2711,6 @@ static int send_chown(struct send_ctx *sctx, u64 ino, u64 gen, u64 uid, u64 gid)
27442711
27452712static int send_utimes (struct send_ctx * sctx , u64 ino , u64 gen )
27462713{
2747- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
27482714 int ret = 0 ;
27492715 struct fs_path * p = NULL ;
27502716 struct btrfs_inode_item * ii ;
@@ -2753,8 +2719,6 @@ static int send_utimes(struct send_ctx *sctx, u64 ino, u64 gen)
27532719 struct btrfs_key key ;
27542720 int slot ;
27552721
2756- btrfs_debug (fs_info , "send_utimes %llu" , ino );
2757-
27582722 p = get_path_for_command (sctx , ino , gen );
27592723 if (IS_ERR (p ))
27602724 return PTR_ERR (p );
@@ -2861,7 +2825,6 @@ static int trim_dir_utimes_cache(struct send_ctx *sctx)
28612825 */
28622826static int send_create_inode (struct send_ctx * sctx , u64 ino )
28632827{
2864- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
28652828 int ret = 0 ;
28662829 struct fs_path * p ;
28672830 int cmd ;
@@ -2870,8 +2833,6 @@ static int send_create_inode(struct send_ctx *sctx, u64 ino)
28702833 u64 mode ;
28712834 u64 rdev ;
28722835
2873- btrfs_debug (fs_info , "send_create_inode %llu" , ino );
2874-
28752836 p = fs_path_alloc ();
28762837 if (!p )
28772838 return - ENOMEM ;
@@ -4224,8 +4185,6 @@ static int process_recorded_refs(struct send_ctx *sctx, int *pending_move)
42244185 bool orphanized_dir = false;
42254186 bool orphanized_ancestor = false;
42264187
4227- btrfs_debug (fs_info , "process_recorded_refs %llu" , sctx -> cur_ino );
4228-
42294188 /*
42304189 * This should never happen as the root dir always has the same ref
42314190 * which is always '..'
@@ -5334,12 +5293,9 @@ static int put_file_data(struct send_ctx *sctx, u64 offset, u32 len)
53345293 */
53355294static int send_write (struct send_ctx * sctx , u64 offset , u32 len )
53365295{
5337- struct btrfs_fs_info * fs_info = sctx -> send_root -> fs_info ;
53385296 int ret = 0 ;
53395297 struct fs_path * p ;
53405298
5341- btrfs_debug (fs_info , "send_write offset=%llu, len=%d" , offset , len );
5342-
53435299 p = get_cur_inode_path (sctx );
53445300 if (IS_ERR (p ))
53455301 return PTR_ERR (p );
@@ -5372,11 +5328,6 @@ static int send_clone(struct send_ctx *sctx,
53725328 struct fs_path * cur_inode_path ;
53735329 u64 gen ;
53745330
5375- btrfs_debug (sctx -> send_root -> fs_info ,
5376- "send_clone offset=%llu, len=%d, clone_root=%llu, clone_inode=%llu, clone_offset=%llu" ,
5377- offset , len , btrfs_root_id (clone_root -> root ),
5378- clone_root -> ino , clone_root -> offset );
5379-
53805331 cur_inode_path = get_cur_inode_path (sctx );
53815332 if (IS_ERR (cur_inode_path ))
53825333 return PTR_ERR (cur_inode_path );
0 commit comments