Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 213198
b: refs/heads/master
c: 2cf6d26
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Jens Axboe committed Sep 10, 2010
1 parent ca394dd commit f4b17e4
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b372d360df6deaf79a58a02fa0cc0d7e0aa3e92f
refs/heads/master: 2cf6d26a354ab6362e301b5a323832b02867df47
3 changes: 2 additions & 1 deletion trunk/fs/ext4/mballoc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2566,7 +2566,8 @@ static inline void ext4_issue_discard(struct super_block *sb,
discard_block = block + ext4_group_first_block_no(sb, block_group);
trace_ext4_discard_blocks(sb,
(unsigned long long) discard_block, count);
ret = sb_issue_discard(sb, discard_block, count);
ret = sb_issue_discard(sb, discard_block, count, GFP_NOFS,
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
if (ret == EOPNOTSUPP) {
ext4_warning(sb, "discard not supported, disabling");
clear_opt(EXT4_SB(sb)->s_mount_opt, DISCARD);
Expand Down
4 changes: 3 additions & 1 deletion trunk/fs/fat/fatent.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,7 +577,9 @@ int fat_free_clusters(struct inode *inode, int cluster)

sb_issue_discard(sb,
fat_clus_to_blknr(sbi, first_cl),
nr_clus * sbi->sec_per_clus);
nr_clus * sbi->sec_per_clus,
GFP_NOFS,
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);

first_cl = cluster;
}
Expand Down
11 changes: 5 additions & 6 deletions trunk/include/linux/blkdev.h
Original file line number Diff line number Diff line change
Expand Up @@ -881,13 +881,12 @@ extern int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
sector_t nr_sects, gfp_t gfp_mask, unsigned long flags);
extern int blkdev_issue_zeroout(struct block_device *bdev, sector_t sector,
sector_t nr_sects, gfp_t gfp_mask, unsigned long flags);
static inline int sb_issue_discard(struct super_block *sb,
sector_t block, sector_t nr_blocks)
static inline int sb_issue_discard(struct super_block *sb, sector_t block,
sector_t nr_blocks, gfp_t gfp_mask, unsigned long flags)
{
block <<= (sb->s_blocksize_bits - 9);
nr_blocks <<= (sb->s_blocksize_bits - 9);
return blkdev_issue_discard(sb->s_bdev, block, nr_blocks, GFP_NOFS,
BLKDEV_IFL_WAIT | BLKDEV_IFL_BARRIER);
return blkdev_issue_discard(sb->s_bdev, block << (sb->s_blocksize_bits - 9),
nr_blocks << (sb->s_blocksize_bits - 9),
gfp_mask, flags);
}

extern int blk_verify_command(unsigned char *cmd, fmode_t has_write_perm);
Expand Down

0 comments on commit f4b17e4

Please sign in to comment.