The Brazilian, who was signed from Sevilla in 2010, has a buyout clause of 90 million euros.
"He's become known as one of the most versatile players on Barcelona's roster," Barca said.
"He's performed well in the centre-back position, as well as the right and left full-back positions, and as an attacking midfielder."
The 28-year-old, who moved into the centre of defence to help cover for injuries this season, has scored 10 goals in 105 matches for Barcelona.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.