Re: [PATCH] bio: skip atomic inc/dec of ->bi_remaining for non-chains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 04/20/2015 10:04 AM, Jan Kara wrote:
On Fri 17-04-15 08:59:33, Jens Axboe wrote:
@@ -292,8 +292,8 @@ void bio_reset(struct bio *bio)
  	__bio_free(bio);

  	memset(bio, 0, BIO_RESET_BYTES);
-	bio->bi_flags = flags|(1 << BIO_UPTODATE);
-	atomic_set(&bio->bi_remaining, 1);
+	bio->bi_flags = flags | 1 << BIO_UPTODATE;
   Although this is correct, I'd prefer to keep parenthesis around 1 <<
BIO_UPTODATE. Maybe I'm not a real C hacker but I had to lookup the
operator precedence of | vs << :).

Heh, I think we can safely say you are a real C hacker, lets just keep the parenthesis if that makes it easier to read/verify.

Otherwise the patch looks good to me (but I'm not an expert in this area, I
just looked into the patch by accident because I thought it's another
respin of your direct IO patch ;).

It's a parallel effort, getting rid of the atomics where we can... Thanks for looking at it, can I add your reviewed-by tag with the parenthesis change?

--
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux